pf » Checking your JDBC Driver Version
March 31, 2004
Checking your JDBC Driver Version
Macromedia recently updated their JDBC driver technote, but I wasn't sure if I already had the 3.3 driver installed (since they may have just updated the text in the technote). So I wrote some code to check what version of the jdbc driver my server was running, and sure enough I needed to update it:
<cfset jdbcDriver = CreateObject("java", "macromedia.jdbc.sqlserver.SQLServerDriver")>
<cfoutput>
#jdbcDriver.getMajorVersion()#.#jdbcDriver.getMinorVersion()#
</cfoutput>
After you install the 3.3 drivers, the result of this code should be "3.3", if it says otherwise, you can update your drivers.
Related Entries
- Null Java References in CF 6 vs 7 - January 10, 2006
- Thread Priority, and Yielding - April 6, 2005
- Determining the size of objects in memory - December 10, 2003
- How to make ColdFusion MX go to sleep - October 14, 2002
- Serializing CFC's in ColdFusion 8 - August 6, 2007
Trackback Address: 118/BC2705528738D43D1E72B9716F88D1CC
Comments
On 03/31/2004 at 4:57:05 PM MST Pete Freitag wrote:
1
FYI I'm using the java.sql.Driver interface, all jdbc drivers implement this interface.
On 04/12/2004 at 9:32:27 AM MDT Mario Ciliotta wrote:
2
How would I be able to get the version of the Oracle Drivers I am using.
On 04/13/2004 at 12:14:32 AM MDT Pete Freitag wrote:
3
The Macromedia Oracle Driver class name is macromedia.jdbc.oracle.OracleDriver just replace that as the second argument of the createObject function. But since the oracle driver is contained in the macromedia_drivers.jar file along with SQL Server, and other drivers you should get the same results. You can replace the class name with any JDBC driver class name, and run this code.
On 11/09/2004 at 5:36:00 PM MST Mirza H Ahmed wrote:
4
hi, i cant fix it. i have oracle server in a different ip address and i am using mx. i cant figure out the jdbc url, what is driver class, driver name?
On 03/11/2005 at 10:29:48 AM MST Dinesh Pandey wrote:
5
public static void displayDbProperties(Connection con){ java.sql.DatabaseMetaData dm = null; java.sql.ResultSet rs = null; try{ if(con!=null){ dm = con.getMetaData(); System.out.println("\nDriver Information"); System.out.println("\tDriver Name: "+ dm.getDriverName()); System.out.println("\tDriver Version: "+ dm.getDriverVersion ()); System.out.println("\nDatabase Information "); System.out.println("\tDatabase Name: "+ dm.getDatabaseProductName()); System.out.println("\tDatabase Version: "+ dm.getDatabaseProductVersion()); System.out.println("\tMaximum Connection (If zero--> no limit): "+dm.getMaxConnections()); System.out.println("\tNumeric Functions: "+dm.getNumericFunctions()); System.out.println("Avalilable Catalogs "); rs = dm.getCatalogs(); while(rs.next()){ System.out.println("\tcatalog: "+ rs.getString(1)); } rs.close(); rs = null; }else System.out.println("Error: No active Connection"); }catch(Exception e){ e.printStackTrace(); } dm=null; } }
On 05/12/2006 at 9:24:19 AM MDT end-user wrote:
6
If you're looking for alternative JDBC drivers, try jTDS from SourceForge.net. It's the *only* JDBC driver that will support SSL connections to your MSSQL server!
- CFSCRIPT Cheatsheet
- 3 New Image Effects for ColdFusion 8
- Googlebot to Submit Web Forms
- ColdFusion 8 Update 1 Fixes some Image Processing Quirks
- 10 Most Useful Image Functions in ColdFusion 8
- Speaking at NYC CFUG This Week
- Adobe AIR Tutorial for HTML / JavaScript Developers
- INFORMATION_SCHEMA Support in MySQL, PostgreSQL
Subscribe to my RSS Feed:
RSS
RSS
add to del.icio.us
Pete Freitag is a software engineer, and web developer located in










