View comments | RSS feed

Connecting to other data sources

Use the settings in the following table to connect ColdFusion to data sources that do not appear in the drop-down list of drivers:
Setting
Description
CF Data Source Name
The data source name (DSN) used by ColdFusion to connect to the data source.
JDBC URL
The JDBC Connection URL for this data source.
Driver Class
The class (1, 2, 3, or 4) of the driver.
Driver Name
(Optional) The name of the driver.
Username
The user name that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion application does not supply a user name-for example, in a cfquery tag.
Password
The password that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion application does not supply a password-for example, in a cfquery tag.
Description
(Optional) A description for this connection.
Maintain Connections
ColdFusion establishes a connection to a data source for every operation that requires one. Enable this option to improve performance by caching the data source connection.
Timeout (min)
The maximum number of minutes after the data source connection is made that you want ColdFusion to cache a connection after it is used.
Interval (sec)
The time (in seconds) that the server waits between cycles to check for expired data source connections to close.
Disable Connections
If selected, suspends all client connections.
Login Timeout (sec)
The number of seconds before ColdFusion times out the data source connection login attempt.
CLOB
Select to return the entire contents of any CLOB/Text columns in the database for this data source. If unchecked, ColdFusion retrieves the amount specified in the Long Text Buffer setting.
BLOB
Select to return the entire contents of any BLOB/Image columns in the database for this data source. If unchecked, ColdFusion retrieves the amount specified in the Blob Buffer setting.
LongText Buffer (chr)
The default buffer size, used if Enable Long Text Retrieval(CLOB) is not selected. Default is 65000 bytes.
BLOB Buffer (bytes)
The default buffer size, used if Enable binary large object retrieval (BLOB) is not selected. Default is 65000 bytes.
Allowed SQL
The SQL operations that can interact with the current data source.

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6

Comments are no longer accepted for ColdFusion MX. ColdFusion 8 is the current version.

Comments


jsmith@origo.telenor said on Jul 16, 2002 at 8:12 AM :
This one seriously need a working example.

First I downloaded and default-installed the MS SQL driver:

http://msdn.microsoft.com/downloads/default.asp?URL=/downloads/sample.asp?url=/MSDN-FILES/027/001/779/msdncompositedoc.xml

Then, quoting Dave Wats/Fig Leaf who quoted Jeff Garza on CFTALK:
----------------------------
"Copied the three Microsoft .jar files to CFUSIONMXib\ directory.

added
"c:\cfusionmxlib\msbase.jar,c:\cfusionmxlib\mssqlserver.jar,c:\cfusionmxl
ib\msutil.jar" to the coldfusion java class path via the administrator.

set up the dsn using the following information as an "other datasource"
connection.

jdbc url: jdbc:microsoft:sqlserver://localhost:1433;
driver class: com.microsoft.jdbc.sqlserver.sqlserverdriver
driver name: microsoft sql2000 jdbc driver
username: sa
password: *********
connect string: selectmethod=direct

i included the selectmethod in the connect string as the sql server jdbc driver shows that it's not an optional parameter and it's not provided in the other datasource form. i don't know if the connection will work without it or not."
----------------------------

the documentation suggests that the driver class should be "1-4"; as can be seen from this example, that is wrong.

regards,
jørgen smith
takenori said on aug 25, 2002 at 10:51 am :
i agree with jørgen smith.
driver class have to be not 1,2,3 or 4.

in addition to this,
connection string doesn't take no effect.
if you add any option, add to jdbc url.

takenori,
carehart@systemanage said on sep 3, 2002 at 2:58 am :
agreeing with the above, to a degree, the value for "driver name" definitely is not the value 1 to 4 bt instead the jar name for the jdbc driver. i don't think you have to bother with the setting of the admin's jvm classpath value, though. i just placed a jdbc driver jar file in the cfusionmxlib directory, set the correct values in the dsn definition, and was ok.

btw, for anyone using the sap db database, here are the steps that worked for me:

- save the downloaded sapdbc.jar to cfusionmxlib
- in the admin dsn definition, select "other" for driver type
- in the screen that follows, for the "jdbc url" use jdbc:sapdb://[yourserver]/[yourdb]
- for the "driver name", use com.sap.dbtech.jdbc.driversapdb
- use anything for the driver name

/charlie
lcherene said on may 19, 2003 at 3:33 pm :
i'm sure that this table is useful, but how does one use it?
my exsisting cf data sources are from ms excel files. do i use this table to enable the creation of datasources from excel files? if so, how, if not so,what needs be done? i guess i need to know wher square 1 is. as all-too-often happens, the answer lies buried in multimegabytes of guis.

 

rss feed | send me an e-mail when comments are added to this page | comment report

current page: http://livedocs.adobe.com/coldfusion/6/administering_coldfusion_mx/datasources_adv_mjs12.htm