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

SQL Anywhere 11.0.1 (Français) » UltraLiteJ » UltraLiteJ Reference » UltraLiteJ API reference

 

Connection interface

Describes a database connection, which is required to initiate database operations.

Syntax
public Connection
Remarks

A connection is obtained using the connect or createDatabase methods of the DatabaseManager class. Use the release method when the connection is no longer needed. When all connections for a database are released, the database is closed.

A connection provides the following capabilities:

  • create new schema (tables, indexes and publications)

  • create new value and domain objects

  • permanently commit changes to the database

  • prepare SQL statements for execution

  • roll back uncommited changes to the database

  • checkpoint (update the underlying persistent store with committed changes, rather than just storing the change transactions) the database.

The following example demonstrates how to create a schema for a simple database. The database contains a table named T1, which has a single integer primary key column named num, and a table named T2, which has an integer primary key column named num and an integer column named quantity. T2 has an addition index on quantity. A publication named PubA contains T1.

table_schema = conn.createTable("T1");
 table_schema.createColumn("num", Domain.INTEGER);
Members

All members of Connection, including all inherited members.


CONNECTED variable
NOT_CONNECTED variable
OPTION_DATABASE_ID variable
OPTION_DATE_FORMAT variable
OPTION_DATE_ORDER variable
OPTION_ML_REMOTE_ID variable
OPTION_NEAREST_CENTURY variable
OPTION_PRECISION variable
OPTION_SCALE variable
OPTION_TIMESTAMP_FORMAT variable
OPTION_TIMESTAMP_INCREMENT variable
OPTION_TIME_FORMAT variable
PROPERTY_DATABASE_NAME variable
PROPERTY_PAGE_SIZE variable
SYNC_ALL variable
SYNC_ALL_DB_PUB_NAME variable
SYNC_ALL_PUBS variable
checkpoint method
commit method
createDecimalNumber method
createDecimalNumber method
createDomain method
createDomain method
createDomain method
createForeignKey method
createPublication method
createSyncParms method
createSyncParms method
createTable method
createUUIDValue method
createValue method
disableSynchronization method
dropDatabase method
dropForeignKey method
dropPublication method
dropTable method
emergencyShutdown method
enableSynchronization method
getDatabaseId method
getDatabaseInfo method
getDatabasePartitionSize method
getDatabaseProperty method
getLastDownloadTime method
getOption method
getState method
prepareStatement method
release method
renameTable method
resetLastDownloadTime method
rollback method
schemaCreateBegin method
schemaCreateComplete method
setDatabaseId method
setOption method
startSynchronizationDelete method
stopSynchronizationDelete method
synchronize method
truncateTable method