Using Connection String Options
13
Limiting DSN definitions
Another use of the connect string feature is to limit data source name (DSN)
definitions. For example, if you are connecting to a server that has multiple
databases defined, you might not want to define a ColdFusion DSN for each
database. Instead, you can now use the connection string to supply the database
name for the single DSN that you defined for that server. The connection string
allows ColdFusion to support ODBC connections for databases that lack a data
source definition in the odbc.ini settings. All information required by the particular
ODBC driver to connect must be specified in the connection string.
Changes to the ColdFusion Administrator
The Settings page in the ColdFusion 5 Administrator includes a Connection String
option to support the connect string feature. You can specify a connect string in the
ColdFusion settings for an ODBC data source. If you specify a
connectstring
attribute for a tag that supports the attribute, then it overrides the Administrator
setting.
Changes to CFML tags
A new connectstring attribute is now available in the following CFML tags:
•
cfquery
•
cfinsert
•
cfupdate
•
cfstoredproc
•
cfgridupdate
Using a connect string in a cached query
As with other query settings, when a query is cached, the connect string setting
becomes part of that cached query. The cache is purged only if the query is changed,
for example, if you change the data source name.
Use dynamic for dbtype attribute
When connecting to data sources dynamically with a connection string, the
dbtype
attribute for tags making dynamic connections is set to
dbtype=dynamic
.
This
feature allows a ColdFusion application to run on multiple servers without requiring
odbc.ini Registry entries on each server. You must specify all information required by
the ODBC driver to connect in the
connectstring
attribute. For ODBC connections
using the default dbtype (that is, dbtype=odbc), you can use the
connectstring
attribute to provide additional connection information or override connection
information that is specified in the DSN.
Summary of Contents for COLDFUSION 5-ADVANCED ADMINISTRATION
Page 1: ...Macromedia Incorporated Advanced ColdFusion Administration ColdFusion 5...
Page 20: ......
Page 56: ...38 Chapter 1 Advanced Data Source Management...
Page 74: ...56 Chapter 2 Administrator Tools...
Page 76: ......
Page 86: ...68 Chapter 3 ColdFusion Security...
Page 87: ...To Learn More About Security 69...
Page 88: ...70 Chapter 3 ColdFusion Security...
Page 130: ...112 Chapter 5 Configuring Advanced Security...
Page 132: ......
Page 154: ...136 Chapter 6 Configuring Verity K2 Server...
Page 162: ...144 Chapter 7 Indexing XML Documents...
Page 202: ...184 Chapter 8 Verity Spider...
Page 236: ...218 Chapter 10 Verity Troubleshooting Utilities...
Page 238: ......
Page 348: ...330 Chapter 14 ClusterCATS Utilities...
Page 349: ...Using sniff 331...
Page 350: ...332 Chapter 14 ClusterCATS Utilities...
Page 362: ...344 Chapter 15 Optimizing ClusterCATS...
Page 372: ...354 Index...