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 - .NET Programming » Understanding UltraLite.NET Development


Accessing schema information

The objects in the table API represent tables, columns, indexes, and synchronization publications. Each object has a Schema property 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 ULDatabaseSchema object, access ULConnection.Schema.

    See ULConnection class.

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

    To obtain a ULTableSchema object, access ULTable.Schema.

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

    To obtain a ULIndexSchema object, call the ULTableSchema.GetIndex, the ULTableSchema.GetOptimalIndex, or the ULTableSchema.GetPrimaryKey method.

  • PublicationSchema   A list of the tables and columns contained in a publication. Publications are comprised of schema only, there is no Publication object.

    To obtain a ULPublicationSchema object, call the ULDatabaseSchema.GetPublicationSchema method.

See ULTableSchema class.