12
Using Connection String Options
ColdFusion 5 allows you to specify a connection string for ODBC data sources. You
can do this programmatically or in the ColdFusion Administrator.
About the connection string
You can use the connection string to do the following tasks:
Some ODBC data sources let you pass driver-specific options. A database
administrator (DBA) can use these options to see which applications are connected
to the database server, and to identify who is running those applications. For
example, many applications that connect to Microsoft SQL Server pass the
attribue-value pairs APP="appname" and WSID="work station id" when connecting.
Consider the following
the APP and WSID attributes
<cfquery
>
</cfquery>
The APP and WSID values are readily available when you run the above query. A SQL
Server DBA can use Profiler to view this information in a trace:
Specify connection attributes that cannot be defined in the odbc.ini settings.
Override odbc.ini settings.
Make ODBC connections dynamically when there is no data source defined in
the odbc.ini settings.
name="getInfo" datasource="2Northwind" dbtype="ODBC"
connectstring="DRIVER={SQL SERVER};
SERVER=(local); UID=sa; PWD=;
DATABASE=Northwind;
APP=ColdFusion5;WSID=Workstation_Moe"
SELECT
*
FROM
shippers
Chapter 1 Advanced Data Source Management
, which specifies values in the connection string for
cfquery
:
Need help?
Do you have a question about the COLDFUSION 5-ADVANCED ADMINISTRATION and is the answer not in the manual?