System Table Definitions

The ADOCE control creates system tables for internal use so that it can add to the functionality provided by Windows CE. Do not alter these tables in any way. The result of altering the system tables, regardless of success or failure, is undefined and unsupported. The tables provided in this section are for informational purposes only.

The following table shows the four ADOCE system databases.

Name Description
MSysTables All tables recognized by ADOCE, and the characteristics of these tables
MSysIndexes All indexes for all tables recognized by ADOCE
MSysFields All fields for all tables recognized by ADOCE
MSysProcs Stored SQL statements that can be executed by name

The following table shows the fields contained within MSysTables.

Field Type Description
TableName varchar Name of the table
TableID int Identifier of the table—corresponds to the CEOID
TableFlags int Collection of bits, where 1 = system table, 2 = read-only
Rows int Number of rows in the table
Size int Size of the table in bytes
Changed datetime Date and time that the table was last changed

The following table shows the fields contained within MSysIndexes.

Field Type Description
TableID int Identifier of the table with this index
IndexName varchar Name of the index
FieldID int Identifier of the field being indexed
IndexFlags int Collection of bits, determining the sort order:

CEDB_SORT_DESCENDING = 1
CEDB_SORT_CASEINSENSITIVE = 2
CEDB_SORT_UNKNOWNFIRST = 4
CEDB_SORT_GENERICORDER = 8


The following table shows the fields contained within MSysFields.

Field Type Description
TableID int Identifier of the table with this field.
FieldName varchar Name of the field.
FieldID int Identifier for the field.
Len smallint Maximum length of the field.
ODBCType   The original data type of a column when it is copied from the desktop computer. When you convert a table from the desktop computer to a device, and then back to the desktop computer, the final table has the same data types. This field is present because the data type mappings do not directly correlate in either direction.

The following table shows the fields contained within MSysProcs.

Field Type Description
ProcName varchar Name of the stored procedure
SQLText text SQL statement for the stored procedure

The following code example sets constants for the ODBCType field.

Const SQL_UNKNOWN_TYPE = 0
Const SQL_CHAR = 1
Const SQL_NUMERIC = 2
Const SQL_DECIMAL = 3
Const SQL_INTEGER = 4
Const SQL_SMALLINT = 5
Const SQL_FLOAT = 6
Const SQL_REAL = 7
Const SQL_DOUBLE = 8
Const SQL_DATETIME = 9
Const SQL_TIME = 10
Const SQL_TIMESTAMP = 11
Const SQL_VARCHAR = 12
Const SQL_TYPE_DATE = 91
Const SQL_TYPE_TIME = 92
Const SQL_TYPE_TIMESTAMP = 93
Const SQL_LONGVARCHAR = -1
Const SQL_BINARY = -2
Const SQL_VARBINARY = -3
Const SQL_LONGVARBINARY = -4
Const SQL_BIGINT = -5
Const SQL_TINYINT = -6
Const SQL_BIT = -7