Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » UltraLite - C and C++ Programming » Application Development » Developing applications using the UltraLite C++ API


Accessing schema information

The objects in the API represent tables, columns, indexes, and synchronization publications. Each object has a GetSchema method that provides access to information about the structure of that object.

You cannot modify the schema through the API. You can only retrieve information about the schema.

You can access the following schema objects and information:

  • DatabaseSchema   Exposes the number and names of the tables in the database, as well as global properties such as the format of dates and times.

    To obtain a DatabaseSchema object, use Conn->GetSchema.

    See GetSchema function.

  • TableSchema   Exposes the number and names of the columns and indexes for this table.

    To obtain a TableSchema object, use tbl->GetSchema.

    See GetSchema function.

  • IndexSchema   Returns information about the column in the index. As an index has no data directly associated with it there is no separate Index class, just the IndexSchema class.

    To obtain a IndexSchema object, call the table_schema->GetIndexSchema or table_schema->GetPrimaryKey methods.

    See UltraLite_Table_iface class.