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 » SQL Anywhere Server - Database Administration » SQL Anywhere database connections » SQL Anywhere for Windows Mobile » Tutorial: Using Windows Mobile sample applications


Lesson 3: Using the ESQL Sample for Windows Mobile

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.


To select data in the tables, you must have the appropriate SELECT privileges on the objects referred to in the SELECT statement

Context and remarks

The source code for this sample can be found in %SQLANYSAMP16%\SQLAnywhere\ce\esql_sample.

You can load this project file in Visual Studio 2005 from: %SQLANYSAMP16%\SQLAnywhere\ce\esql_sample\esql_sample.sln.


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

  1. On your Windows Mobile device, tap Start » Programs » SQLAny16 » ESQL Sample.

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

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

    Data from the Employees table appears in the data window.

  4. Use the scroll bars to view Employee table data.

  5. To access data in the Customers table, type SELECT * FROM Customers, and tap ExecSQL.

    Customer data replaces the employee data in the data window.

  6. Tap Menu » Disconnect to shut down the network database server.

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

  7. Close the ESQL Sample by tapping x in the top right corner of the window.


You have started the sample database and accessed data using SQL statements.