This tutorial is based on Visual Studio and the .NET Framework. The complete application can be found in the ADO.NET project samples-dir\SQLAnywhere\ADO.NET\SimpleViewer\SimpleViewer.sln.
In this tutorial, you use Microsoft Visual Studio, the Server Explorer, and the SQL Anywhere .NET Data Provider to create an application that accesses one of the tables in the SQL Anywhere sample database, allowing you to examine rows and perform updates.
To develop a database application with Visual Studio
Start Visual Studio.
From the Visual Studio File menu, choose New » Project.
The New Project window appears.
In the Visual Studio View menu, choose Server Explorer.
The Server Explorer window appears.
In the Server Explorer window, right-click Data Connections and choose Add Connection.
The Add Connection window appears.
If you have used Add Connection before, then click Change to change the data source to SQL Anywhere.
A new connection named SQL Anywhere.demo11 appears in the Server Explorer window.
Expand the SQL Anywhere.demo11 connection in the Server Explorer window until you see the table names.
This shows the rows and columns of the Products table in a window.
From the Visual Studio Data menu, choose Add New Data Source.
The Data Source Configuration Wizard appears.
From the Visual Studio Data menu, choose Show Data Sources.
The Data Sources window appears.
Expand the Products table in the Data Sources window.
A dataset control and several labeled text fields appear on the form.
On the form, select the picture box next to Photo.
The Picture Box Tasks window opens.
Build and run the project.
The application connects to the SQL Anywhere sample database and displays the first row of the Products table in the text boxes and picture box.
You have now created a simple, yet powerful, .NET application using Visual Studio, the Server Explorer, and the SQL Anywhere .NET Data Provider.
Shut down the application and then save your project.
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |