- Home
- ColdFusion
- How to Access a SQL Anywhere Database with ColdFusion
How to Access a SQL Anywhere Database with ColdFusion
- By Samee Jhor
- Published 01/2/2007
- ColdFusion
- Unrated
Samee Jhor
View all articles by Samee Jhor
Introduction
SQL Anywhere is an easy to use, enterprise quality, relational database with a small foot print that can be used in a variety of applications including embedded and mobile. My first experience with SQL Anywhere was in an application with Siebel mobile clients, who kept a portion of the database related to their role in the mobile client, and synchronized with either Oracle or MS SQL servers occasionally. I believe it was the excellent synchronization, SQL support, and the small foot print that made this choice natural.
Persisting a small database that can be embedded into an application is required in some cases. Consider the situation of a traveling sales man who keeps the data and occasionally reconnects either by a pull or a push type of replication. In fact the Siebel client mentioned above did have this functionality. The mobile client had the SQL Anywhere database.
ColdFusion provides excellent support for connecting to a variety of data sources through an easy to use administrative panel. ColdFusion easily connects to the SQL Anywhere database through an ODBC Socket. This tutorial is about connecting from ColdFusion MX 6.1 Server to a SQL Anywhere 9 database. Both servers are on an Windows XP Professional with ColdFusion MX 6.1 working off IIS 5.1 web server.
Start the Backend Database ServerThe backend database in this tutorial is the mysorian.db on the mysorian Server shown in Fig.1. I refer to my previous articles, you can review the steps needed for this to happen. Please also look for the following tutorial to appear on ASP Free: MS Access to SQL Anywhere With Migration Wizard. Basically you use a command line statement with some arguments and then connect to the back end using Sybase Central. You need to specify the HTTP port as an argument. Port=8082 has been used, as other ports were used for IIS, Apache Server, and so on. Three tables imported from a 'pubs' database from SQL 2000 Server are shown here. If you want to carry out a similar table transfer you could use the DTS, but then you may have to make some transformations because of the data type involved.
Fig. 1
Spread The Word
Article Series
-
How to Access a SQL Anywhere Database with ColdFusion

