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

SAP Sybase SQL Anywhere 16.0 » UltraLite - Java Programming » UltraLiteJ application development » Code examples

 

Java SE example: Inserting rows

Run the Java SE sample to understand how to insert rows into an UltraLite Java edition database.

Prerequisites

There are no prerequisites for this task.

 Task
  1. Change to the following directory: %SQLANYSAMP16%\UltraLiteJ\J2SE.

  2. Run the CreateDb example:

    rundemo CreateDb
  3. Run the following command (the command is case sensitive):

    rundemo LoadDb

Results

The application runs successfully. Rows are inserted in the database.

Inserted data is persisted in the database only when the commit method is called from the Connection object.

When a row is inserted, but not yet committed, it is visible to other connections. This introduces the potential for a connection to retrieve row data that has not actually been committed.

 See also