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

SQL Anywhere 12.0.1 » UltraLite - Java Programming » UltraLiteJ application development


Quick start guide to UltraLiteJ application development

When creating an UltraLiteJ application, you typically complete the following data management tasks in your application code:

  1. Import the UltraLiteJ API package into your Java file(s).

    The UltraLiteJ package name and location depends on the device you are developing applications for.

  2. Create a new Configuration object to create or connect to a database.

    Configuration objects define where the client database is located or where it should be created. They also specify the username and password required to connect to the database. Variations of a Configuration object are available for different devices and for non-persistent database stores.

  3. Create a new Connection object.

    Connection objects connect to a client database using the specifications defined in the Configuration object.

  4. Create or modify the database schema using SQL statements, and use the PreparedStatement interface to query the database.

    You can use SQL statements to create or update tables, indexes, foreign keys, and publications for your database.

    PreparedStatement objects query the database associated with the Connection object. They accept supported SQL statements, which are passed as strings. You can use PreparedStatement objects to update the contents of the database.

  5. Generate ResultSet objects.

    ResultSet objects are created when the Connection object executes a PreparedStatement containing a SQL SELECT statement. You can use ResultSet objects to obtain rows of query results to view the table contents of the database.

 See also