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

SQL Anywhere 10.0.1 » SQL Anywhere Server - Database Administration » SQL Anywhere for Windows CE » Using the Windows CE sample applications

The ADOCE Sample Next Page

The ESQL Sample


The ESQL Sample demonstrates a simple application that uses the embedded SQL programming interface. This application allows you to start the sample database running on the network database server, and access data using SQL statements.

The source code for this sample can be found in samples-dir\SQLAnywhere\ce\esql_sample.

You can load this project file in Visual Studio 2005 from: samples-dir\SQLAnywhere\ce\sql_sample\esql_sample.sln.

Note

In the ESQL Sample user interface, SQL statements must be entered on a single line.

To use the ESQL Sample
  1. Start the ESQL Sample by tapping Start > Programs > SQLAny10.

  2. Tap ESQL Sample.

  3. Tap Connect to connect to the sample database using the default connection string.

    The sample database starts on a network database server. The Server Messages window appears briefly, then disappears.

  4. Tap ExecSQL to execute the default SQL statement, SELECT * FROM Employees.

    All the data from the Employees table appears in the data window.

  5. Navigate through the data in the Employees table using the scroll bars on the bottom and side of the data window.

  6. Access data in another table by typing SELECT * FROM Customers in the ExecSQL field, and then tapping ExecSQL.

    All the data from the Customers table appears in the data window, replacing the data from the Employees table.

  7. Shut down the network database server by tapping Disconnect.

    The ESQL Sample disconnects and the network database server shuts down.

  8. Close the ESQL Sample by tapping OK in the bottom left corner of the window.