Home arrow ColdFusion arrow Page 2 - Querying SQL 2000 Server from ColdFusion
COLDFUSION

Querying SQL 2000 Server from ColdFusion


Following a brief explanation about the database drivers and the application environment in which the ColdFusion MX Server is installed, this tutorial describes a step-by-step method of creating a ColdFusion data source from the administrative panel of a ColdFusion MX 6.1 Server which derives its data from a MS SQL 2000 server. The tutorial then describes a ColdFusion application for running a database query against this data source.

Author Info:
By: Jayaram Krishnaswamy
Rating: 5 stars5 stars5 stars5 stars5 stars / 4
February 07, 2006
TABLE OF CONTENTS:
  1. · Querying SQL 2000 Server from ColdFusion
  2. · Using ColdFusion data sources to connect to SQL Server 2000
  3. · Querying pubs database with a ColdFusion query
  4. · Modifying the query and improving the display

print this article
SEARCH DEVARTICLES

Querying SQL 2000 Server from ColdFusion - Using ColdFusion data sources to connect to SQL Server 2000
(Page 2 of 4 )

When you log into the ColdFusion Administrator you can access the data related items by clicking on Data Sources under Data & Services in the navigational frame as shown. The Main frame shows all the connected data sources and provides an interface for adding a new data source as shown. There are four data sources that probably came with the installation that connect to MS Access database samples.  If you now click on the Driver: drop-down arrow, you can see a variety of databases that you can query from ColdFusion applications as shown.

Since this tutorial is about connecting to a Microsoft SQL Server database, the appropriate choice is made as shown, and a name for the data source is chosen, CFSQL.

Now click on the Add button to add a new data source, which opens up the following screen.  The view is shown with all the relevant information added. Here you give the data source a name, which you will later use in your query. You also specify the database, and the SQL 2000 server instance you will be connecting to, as well as the authentication information. You may also provide the authentication as a part of your query from your ColdFusion application. The name of the SQL Server is XPHTEK, and a short description of this source completes the configuration of the data source.

 

You can also see other possible advanced settings, and other choices you can make, by clicking on the Show Advanced Settings button which opens up the next screen. You have wide flexibility in using this data source by making appropriate choices. 

 

 

For purposes of this tutorial, the default settings are used, and therefore you can now click on the Submit button. If the supplied information is acceptable, and authenticated, you will see that the data source you created is updated and appears in the list of connected data sources. You may also verify all the connections by clicking the Verify All Connections button. If the ODBC Agent has not started, then all the Microsoft Access related connections will show an error status, while it will not affect the SQL connection.

You have now created a data source which allows you to connect to the MS SQL Server's pubs database successfully.


blog comments powered by Disqus
COLDFUSION ARTICLES

- 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 
Support 

Developer Shed Affiliates

 




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