Using Connection String Options
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
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:
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
attribute for tags making dynamic connections is set to
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
using the default dbtype (that is, dbtype=odbc), you can use the
attribute to provide additional connection information or override connection
information that is specified in the DSN.
cfquery
cfinsert
cfupdate
cfstoredproc
cfgridupdate
attribute. For ODBC connections
connectstring
connectstring
. This
dbtype=dynamic
connectstring
13
dbtype
Need help?
Do you have a question about the COLDFUSION 5-ADVANCED ADMINISTRATION and is the answer not in the manual?