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

SQL Anywhere 12.0.1 » SQL Anywhere Server - Programming » .NET application programming » Using the SQL Anywhere .NET Data Provider » Tutorial: Using the Table Viewer code sample

 

Understanding the Table Viewer sample project

This section illustrates some key features of the SQL Anywhere .NET Data Provider by walking through some of the code from the Table Viewer code sample. The Table Viewer project uses the SQL Anywhere sample database, demo.db, which is held in your SQL Anywhere samples directory.

For information about the location of the SQL Anywhere samples directory, see Samples directory.

For information about the sample database, including the tables in the database and the relationships between them, see SQL Anywhere sample database.

In this section the code is described a few lines at a time. Not all code from the sample is included here. To see all the code, open the sample project in %SQLANYSAMP12%\SQLAnywhere\ADO.NET\TableViewer.

 Declaring controls
 Declaring a connection object
 Connecting to the database
 Defining a query
 Displaying the results
 Error handling