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

SQL Anywhere 12.0.0 (Français) » UltraLiteJ » Using UltraLiteJ » Developing UltraLiteJ applications » Coding examples


Example: Reading a table

In this example, a PreparedStatement object is obtained from a connection, and a ResultSet object is obtained from the PreparedStatement. The next method on the ResultSet returns true each time a subsequent row can be obtained. Values for the columns in the current row can then be obtained from the ResultSet object.

 ♦  To run the example
  1. Change to the following directory: samples-dir\UltraLiteJ.

    For information about the default location of samples-dir, see Samples directory.

  2. Run the CreateDb example:

    rundemo CreateDb

    See Example: Creating a database.

  3. Run the LoadDb example:

    rundemo LoadDb

    See Example: Inserting rows.

  4. Run the following command (the command is case sensitive):

    rundemo ReadSeq