Provides static methods to obtain basic configurations, create a new database, and connect to an existing database.
public DatabaseManager
The following examples demonstrate how to open an existing database, and create a new one if it does not exist.
This example works with J2ME devices:
Connection conn; ConfigRecordStore config = DatabaseManager.createConfigurationRecordStore( "test.ulj" ); try { conn = DatabaseManager.connect(config); } catch(ULjException ex) { conn = DatabaseManager.createDatabase(config); // Create the schema here. } |
This example works with J2ME BlackBerry devices:
Connection conn; ConfigObjectStore config = DatabaseManager.createConfigurationObjectStore( "test.ulj" ); try { conn = DatabaseManager.connect(config); } catch(ULjException ex) { conn = DatabaseManager.createDatabase(config); // Create the schema here. } |
This example works with J2SE devices:
Connection conn; ConfigFile config = DatabaseManager.createConfigurationFile( "test.ulj" ); try { conn = DatabaseManager.connect(config); } catch(ULjException ex) { conn = DatabaseManager.createDatabase(config); // Create the schema here. } |
All members of DatabaseManager, including all inherited members.
connect method
createConfigurationFile method
createConfigurationNonPersistent method
createConfigurationObjectStore function (J2ME BlackBerry only)
createConfigurationRecordStore function (J2ME only)
createDatabase method
createSISHTTPListener function (J2ME BlackBerry only)
release method
setErrorLanguage method
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |