What's New in SQL Anywhere Studio
Welcome to SQL Anywhere Studio Version 9
New feature samples
The Adaptive Server Anywhere samples are located at http://ianywhere.codexchange.sybase.com/servlets/ProjectDocumentList?folderID=282
The Simple XML example provides sample code to obtain XML data from Adaptive Server Anywhere via ADO.NET.
This tutorial is intended to give a brief understanding of how to use ASP.NET to access an Adaptive Server Anywhere 9.0 database using ADO.NET. For this example, you can use either Visual Studio.NET 2002 or 2003, with Visual Basic.NET as the development tool. In this tutorial, we walk through all of the steps required to build a sample ASP.NET application to query the Adaptive Server Anywhere database and return the results into a list box all within the browser.
This Show Table sample is an example of a web-based administration tool that displays database information, such as:
Table list
Table contents
Web services available
Database history
This sample helps illustrate the capabilities of the HTTP server to serve HTML and XML data using XML style sheets. During the demonstration, two Adaptive Server Anywhere web services are created:
show_html_table
show_xml_table
This sample shows how easy it is to create a web service within Adaptive Server Anywhere that takes any SQL query and returns a resultset in either HTML or XML format. The SQL commands executed to create this service include:
CREATE SERVICE qhtml TYPE 'html' AUTHORIZATION ON USER DBA SECURE OFF
CREATE SERVICE qxml TYPE 'xml' AUTHORIZATION ON USER DBA SECURE OFF
When the user enters a URL (for example, http://localhost/websample/qhtml?select * from sysusers), the Adaptive Server Anywhere web server receives the URL and parses the text.
This query is executed and as the qhtml service specifies, it returns the results in HTML format.
This sample illustrates how data returned in a SOAP request from Adaptive Server Anywhere can easily be displayed in a .NET DataGrid component. SOAP is a lightweight protocol for exchange of information in a decentralized, distributed environment. It is an XML-based protocol that consists of three parts:
an envelope that defines a framework for describing what is in a message and how to process it
a set of encoding rules for expressing instances of application-defined data types
a convention for representing remote procedure calls and responses
SOAP can potentially be used in combination with a variety of other protocols; however, the only bindings defined in this document describe how to use SOAP in combination with HTTP and HTTP Extension Framework.
The DataGrid is a commonly used data bound list control available within Visual Studio.NET 2003. The DataGrid displays items from a data source in a table that lets you select, sort, and edit these items. The SOAP request from the application connects to the Adaptive Server Anywhere 9.0 Sample database and the results are returned as a .NET DataSet object. Next, the DataSet is used as the DataSource for the DataGrid component. To walk through the demonstration from scratch using the source code, see the file Walkthrough.doc.