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.
In the ESQL Sample user interface, SQL statements must be entered on a single line.
Start the ESQL Sample by tapping Start > Programs > SQLAny10.
Tap ESQL Sample.
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.
Tap ExecSQL to execute the default SQL statement,
SELECT * FROM Employees.
All the data from the Employees table appears in the data window.
Navigate through the data in the Employees table using the scroll bars on the bottom and side of the data window.
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.
Shut down the network database server by tapping Disconnect.
The ESQL Sample disconnects and the network database server shuts down.
Close the ESQL Sample by tapping OK in the bottom left corner of the window.