Feb 03, 2007

MySQL Driver

Posted by: John Barrett

There is a way to use ColdFusion to find out what MySQL driver you are using. Since MySQL is the main database server used on the Mac this may come in handy, well it does for me.

<cfset MySQL_remote = createObject("java",
"java.lang.Class").forName("com.mysql.jdbc.Driver").newInstance()>

<cfdump var="#MySQL_remote#">
<cfoutput>Your Current MySQL JDBC Driver is</cfoutput>
<cfdump var="#MySQL_remote.getMajorVersion()#">.<cfdump var="#MySQL_remote.getMinorVersion()#">
 
Continuing the discussion ...
Comments
Thanks for the post

webhosting's Gravatar Posted by: webhosting - Nov 27, 2008 12:34 AM

Post a Comment
Name

Email

Your URL (optional)

Remember my information ?
Yes No
Subscribe to this comment thread ?
Yes No

Input the letter/number code in the image to verify you're a human and not a spammer.

Subscribe to this thread without commenting

Search

About The Author

Recent Comments