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 ADO.NET Sample Next Page

The ADOCE Sample


The ADOCE Sample demonstrates a simple application that uses ADOCE, the ADO programming interface for Windows CE development. This application allows you to start the sample database running on the network database server, and access data using SQL statements.

You must have Visual Basic installed on your Windows CE device to use the ADOCE sample.

The source code for this sample can be found in on your computer in samples-dir\SQLAnywhere\ce\adoce_sample.

You can load this project in eMbedded Visual Basic from the following location on your computer: samples-dir\SQLAnywhere\ce\adoce_sample.

Note

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

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

  2. Tap ADOCE Sample.

  3. Tap Connect.

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

  4. Tap Execute SQL 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 bar on the side of the data window.

  6. Access a more specific range of data by typing SELECT EmployeeID, Surname FROM Employees and then tapping Execute SQL to execute the statement.

  7. Scroll down to view the data, which appears below the data that is already displayed in the data window.

  8. Access data from another table by typing SELECT * FROM Customers in the Execute SQL field and then tapping Execute SQL.

  9. Scroll down to view the data from the Customers table, which appears below the data that is already displayed in the data window.

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

    The ADOCE Sample disconnects, and the network database server automatically shuts down.

  11. Close the ADOCE Sample by tapping the × in the top right corner of the window.