|
|
|
BROWSE
All Titles WordPress Web Services SOA BPEL Web Graphics & Video Web Development RAW Portugues, Espanol, Italiano, French PHP/MySQL Oracle Open Source Networking & Telephony Moodle Microsoft & .NET Linux Servers jQuery Joomla! JBoss Java e-Learning e-Commerce Dynamics Drupal CRM Cookbook Content Management Beginner Guides Architecture and Analysis AJAX Future Titles Recently Published Titles BOOK ![]() Building Websites with VB.NET and DotNetNuke 4 See More BOOK ![]() ODP.NET Developer’s Guide: Oracle Database 10g Development with Visual Studio 2005 and the Oracle Data Provider for .NET See More BOOK ![]() GDI+ Application Custom Controls with Visual C# 2005 See More BOOK ![]() Visual SourceSafe 2005 Software Configuration Management in Practice See More BOOK ![]() Creating your MySQL Database: Practical Design Tips and Techniques See More See More BOOK ![]() Windows Server 2003 Active Directory Design and Implementation: Creating, Migrating, and Merging Networks See More |
VB.NET Application with SQL Anywhere 10 database
This article by Jayaram Krishnaswamy shows how you can develop a VB.NET 2.0 application using the integration features provided by the SQL Anywhere database. The SQL Anywhere tools are directly accessible without going out of the Visual Studio 2.O IDE. The article describes a window application with two examples developed with this easy to use integration interface. SQL Anywhere also provides a DataWindow specifically for .NET but this is not included in this article. SQL Anywhere 10SQL Anywhere 10 is the latest version of Sybase's feature rich SQL Anywhere database technology. It is highly scalable from the small foot-print UltraLite database all the way to its enterprise server with gigabytes of data. It is a comprehensive database package with built-in support for a wide range of applications, including session based synchronization; data exchange with both relational and non-relational data bases; secure store and forward messaging; messaging with FTP and email; and asynchronous access to mobile web services. You may download an evaluation version of the software and take it for a test drive. Sybase Central is a graphical database management interface to the database and its various supporting applications. The integration features are used in this article to create a Windows application retrieving data from the SQL Anywhere 10’s demonstration database, a database which is a part of the default installation of the developer edition. Overview of SQL Anywhere 10From Sybase Central you can connect to the demo database quite easily by clicking on the Connections menu item and choosing Connect with SQL Anywhere 10. Figure 1 shows the SQL Anywhere management interface, Sybase Central. Using this interface you may also create an ODBC DSN by following the trail; Tools --> SQL Anywhere 10 --> open ODBC Administrator. Figure 1![]() It is very easy to connect to the database
using the ODBC driver which is provided with the default installation of this
product. The Figure 2 shows the User DSN installed
with the default installation in the ODBC Data Source
Administrator window. Figure 2
The Username is DBA and the Password is sql (case sensitive) for the demo database, demo.db. Please refer to the article, "Migrating from Oracle 10G XE to SQL Anywhere 10" which describes connecting to the demo database in detail. Figure 3 shows the demo database and its objects. Figure 3![]()
|
![]() |
For more information, please visit: |
A DataGridView will be added to the form and it will be configured to bring in the data from a table in the demo database.
In the Tools menu locate the DataGridView in the Data group as shown in Figure 12 and drag it to the form. The DataGridView when fully configured will display the data from the database.

Click on the Smart task (right tip of the
DataGridView) and follow from top-to-bottom the listed tasks. The first thing
is of course, the connection. Click on the Add Project Data
Source… hyperlink at the very bottom as shown in Figure 13.


Click on the Database icon and then click on the Next button in the above window. SQL Anywhere.demo10 appears in the first box showing the data source this window will use as shown in Figure 15. You can also see the connection string in this window. For this exercise you will use the option to include the sensitive data in the connection string as shown.

Clicking on the Next
button you pop-up a window as shown in Figure 16 where you can choose to save
the string to a configuration file. Click on the Next
button.

After this screen you will display all the
data source objects from which you can make a choice. You may choose more than
one object. Here the Customers table is chosen as
shown in Figure 17. For this choice the program provides a default dataset, DataSet1 which has been replaced with DsAny
as shown.

When you click on the Finish
button in the above screen the program adds this dataset to the Component Tray
below the design pane. It also adds two other objects, the CustomerBindingSource
and the CustomersTableAdapter as shown in Figure 18.
The DataGridView now develops columns and rows with
the column headings from the customers table as shown. The Data source for the DataGridView is the CustomerBindingSource.
If you have read this article you may be interested to view :
Dr. Jay Krishnaswamy a graduate of the Indian Institute of Science, Bangalore writes on database and web development related topics to several computer programming related web sites. He is an active participant in several forums and discussion groups. Before working in the IT industry as a Microsoft Certified Trainer and a Siebel Certified consultant he taught at several institutes of technology and universities in India, Australia, Brazil and the USA. Links to his articles may be found at his web site or the blog. He lives in Plainsboro, NJ, USA and may be reached at jkrishnaswamy@comcast.net
You may review all the articles by the author on SQL Anywherefollowing this link in his blog.
| ||||||||