Configuring ODBC Data Sources for Windows

When creating or updating an ODBC data source, you use the Create ODBC Data Source page in the Administrator. This page offers a number of options for configuring your ODBC data source. The options visible on the ODBC Data Source page vary based on the database driver being used.

For information about driver-specific options, refer to the following sources of information:

Microsoft Access ODBC options

ColdFusion ODBC options for Microsoft Access data sources are described in the following table.

Microsoft Access ODBC Options
Option Description
Data Source Name A name for your ODBC data source.
Description Descriptive information about the data source.
Database File Click the Browse button to select a database file for a file-based ODBC data source.
System Database Specify a database file to make it accessible to the system or any user, rather than the local user. Note that Access data sources created with ColdFusion and specified as a Database File are automatically created as System Databases.
Driver Settings Page Timeout -- The length of time in milliseconds before a request for a ColdFusion page times out.
Buffer Size -- The total number of bytes ColdFusion uses to cache application pages. To optimize ColdFusion performance, enter a value.
Default Login A username/password combination ColdFusion uses to access the data source. If your ODBC data source requires a username or password, enter them here. To verify your data source, you need to enter login information here.

dBase ODBC Options

ColdFusion ODBC options for dBase data sources are described in the following table.

dBase ODBC Options 
Option Description
Data Source Name A name for your ODBC data source.
Description Descriptive information about the data source.
Database Directory The path dBase database you want to use as an ODBC data source.
Database Version Enter the version number of the dBase database you want to use. ColdFusion supports dBase versions III, IV, and 5.0.
Driver Settings Collating Sequence -- Select the collating sequence you want to use. The collating sequence determines the sequence in which the fields are sorted.
Page Timeout -- Specifies the period of time, in tenths of a second, that a page (if not used) remains in the buffer before being removed.

Microsoft Excel ODBC options

ColdFusion ODBC options for Microsoft Excel data sources are described in the following table.

Microsoft Excel ODBC Options
Option Description
Data Source Name A name for your ODBC data source.
Description Descriptive information about the data source.
Workbook/Directory The path and filename of the Excel workbook you want to use as the ODBC data source.
Version Enter the version number of the Excel workbook you want to use. ColdFusion supports Excel versions 3.4, 4.0, and 5.0.
Driver Settings Rows to Scan -- The number of rows to scan to determine the data type of each column. The data type is determined given the maximum number of kinds of data found. If data is encountered that does not match the data type guessed for the column, the data type will be returned as a NULL value. Enter a number from 1 to 16 for the rows to scan. The value defaults to 8; if it is set to 0, all rows are scanned. A number outside the limit will return an error.

Microsoft Text ODBC options

ColdFusion ODBC options for Microsoft Text data sources are described in the following table.

Microsoft Text ODBC Options
Option Description
Data Source Name A name for your ODBC data source.
Description Descriptive information about the data source.
Database Directory The directory where the text files are found.
Extensions List Lists the file name extensions of the text files on the data source. To use all files in the directory, enter *.*. To use only those files with certain extensions, add each extension you want to use.

ColdFusion settings

To define a number of advanced ODBC and ColdFusion options, select a data source and click the CF Settings button. ColdFusion data source options are described in this table:

ColdFusion ODBC Settings 
Option Description
Login Timeout The amount of time in seconds before ColdFusion times out the connection login page.
Limit Connections Click to enable and then specify the number of simultaneous connections you want to allow for the current data source. Note: If you enable Limit Connections without specifying a limit for simultaneous connections, ColdFusion defaults to unlimited connections.
ColdFusion Login Enter a username/password for accessing the ODBC data source. Any username and password specified in a CFQUERY or other data access tag overrides the values specified in the ColdFusion login.
Maintain database connections Ordinarily, a connection to a data source is established for every operation that requires it. However, you can improve performance by caching the database connection. To do so, click to enable this checkbox. Note: Use caution in enabling this option. If you enable it, ColdFusion can lock database files, which can prevent them from being deleted or overwritten.
Connection timeout Specify the maximum amount of time after the database connection is made (in minutes) you want ColdFusion to cache a connection after it is used. This is different from the server setting to Limit database connection inactive time. This latter setting is server wide and only releases cached connections that have been inactive (not used) for the specified period of time. The Connection Timeout setting does not return a connection to the cache after a specified period of time no matter how frequently or infrequently it has been used. The default is "" or 0 which means the connection timeout is never enforced.
Restrict SQL Operations Select the SQL operations you want to restrict for the current data source. ColdFusion will not execute the SQL operations you select in this list.

Click the Create or Update button to save your settings.