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

SQL Anywhere 11.0.1 (中文) » UltraLite - M-Business Anywhere 编程 » 了解 UltraLite for M-Business Anywhere 开发

 

访问模式信息

每个 Connection、ULTable 和 ResultSet 对象都包含一个模式属性。这些模式对象提供了有关数据库中表、列、索引和发布的信息。

  • DatabaseSchema   数据库中表的数量和名称,以及日期和时间格式等全局属性。

    若要获取 DatabaseSchema 对象,请访问 Connection.databaseSchema 属性。

  • TableSchema   表中的列的编号和名称,以及该表的索引集合。

    若要获取 TableSchema 对象,请访问 ULTable.schema 属性。

  • IndexSchema   关于索引中的列的信息。由于索引没有与其直接关联的数据,所以没有单独的 Index 对象,而只有一个 IndexSchema 对象。

    使用 TableSchema.getIndex 方法可访问 IndexSchema 对象。

  • PublicationSchema   发布中包含的表和列的编号和名称。发布包括 PublicationSchema 对象,但不包括 Publication 对象。

    使用 DatabaseSchema.getPublicationSchema 方法可访问 PublicationSchema 对象。

  • ResultSetSchema   结果集中列的编号和名称。

    使用 PreparedStatement.getResultSetSchema 方法或 ResultSet.schema 属性可访问 ResultSetSchema 对象。