The ODBC Sample demonstrates a simple application that uses the ODBC programming interface. This application allows you to start the sample database running on the network database server, and access data using basic SQL statements.
Prérequis
To select data in the tables, you must have the appropriate SELECT privileges on the objects referred to in the SELECT statement
Contexte et remarques
The source code for this sample can be found in %SQLANYSAMP16%\SQLAnywhere\ce\odbc_sample.
You can load this project file in Visual Studio 2005 from: %SQLANYSAMP16%\SQLAnywhere\ce\odbc_sample\odbc_sample.sln.
In the ODBC Sample user interface, SQL statements must be entered on a single line.
On your Windows Mobile device, tap Start » Programs » SQLAny16 » ODBC Sample.
Tap Connect.
Tap ExecSQL to execute the default SQL statement, SELECT * FROM Employees.
Data from the Employees table appears in the data window.
Use the scroll bars to view Employee table data.
To access data in the Customers table, type SELECT * FROM Customers and tap ExecSQL.
Customer data replaces the employee data in the data window.
Tap Menu » Disconnect to shut down the network database server.
The ODBC Sample disconnects and the network database server shuts down.
Close the ODBC Sample.
![]() |
Discuter à propos de cette page dans DocCommentXchange.
|
Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0 |