1
votes

I'm trying to set up a ColdFusion 8 data source using JDBC on a CLSE5 Linux server. I've downloaded the JDBC drivers from Oracle for both 10g and 11g and placed the JAR files in %CF_INSTALL_Folder%/runtime/lib. I verified that this folder is in the class path on the CF admin settings summary page. According to this Oracle JDBC wiki, the JDBC URL should be:

jdbc:oracle:thin:@[HOST][:PORT]:SID

If I want to use different drivers for different connections, How do I differentiate between them on the data source connection form?

1
I do not use Oracle, but ... do the jars contain different class names? As with any java jar, to load multiple versions, they must have a different class names. Otherwise, the JVM will just pick the first jar it finds and use that one. Normally when creating java objects ie createObject("java",...) you can get around that limitation by using a dynamic class loader, like the JavaLoader.cfc. But I do not think it is possible to do this with CF datasources.Leigh

1 Answers

1
votes

You specify which JDBC driver to use by specifying the JAR's class name in the Driver Class field on the data source administration page. However, this requires that your two JAR files have unique class names.

I would assume that you could use the 11g drivers to connect to your 10g database without any problems unless you are needing to use something specifically deprecated with the 11g drivers. I would at least try that first and see if any issues crop up.

Here is a link to some documentation that describes the different fields on the data source administration page: Connecting to other data sources

Driver Class

The fully qualified class name of the driver. For example, com.inet.tds.TdsDriver. The JAR file that contains this class must be in a directory defined in the ColdFusion classpath.