Home arrow ColdFusion arrow How to Access a SQL Anywhere Database with ColdFusion

How to Access a SQL Anywhere Database with ColdFusion

In this article, you will learn about connecting from the ColdFusion MX 6.1 Server to a SQL Anywhere 9 database. This technique can be useful in a variety of applications, for example when a traveling salesman keeps some data from a database on a PDA or a laptop computer and periodically reconnects to the main database for updates.

Author Info:
By: Jayaram Krishnaswamy
Rating: 5 stars5 stars5 stars5 stars5 stars / 17
April 10, 2006
  1. · How to Access a SQL Anywhere Database with ColdFusion
  2. · Create a Data Source, a DSN
  3. · Drivers in ColdFusion
  4. · Create and verify a test query in SQL Anywhere

print this article

How to Access a SQL Anywhere Database with ColdFusion
(Page 1 of 4 )


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 Server

The backend database in this tutorial is the mysorian.db on the mysorian Server shown in Fig.1. I refer to my previous articles, Part 1 and Part 2 so that 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

blog comments powered by Disqus

- Adobe ColdFusion Just Got More RAD
- How to Access a SQL Anywhere Database with C...
- CFXML: Probing XMLDOM in ColdFusion
- Creating a Web Service with ColdFusion: the ...
- CFAjax: What it is and How to Use it
- Querying SQL 2000 Server from ColdFusion
- Introduction to ColdFusion Markup Language, ...
- Introduction to ColdFusion Markup Language
- Databases and Dreamweaver MX 2004, concluded
- Databases and Dreamweaver MX 2004
- Welcome to Coldfusion MX 6.1, concluded
- Welcome to Coldfusion MX 6.1
- What You Must Know About ColdFusion Flow-Con...
- What You Must Know About Operators in ColdFu...
- Everything You Must Know About ColdFusion Va...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials