Using Coldfusion MX w/Mysql at jodohost

<cfset Access_example =
CreateObject(“java”, “Access_CFQUERY”)>

<cfset Example_results =
Access_example.test_connection(“c:/reports.mdb”, “SELECT TOP 2 * from dailyreport”)>

Yahoo | Mail, Weather, Search, Politics, News, Finance, Sports & Videos

I would HATE to see what some of the more complex queries that I am building would look like in this method. Additionally, if you’re going to use that many CFSet’s, then you really should bundle them all in a CFScript.

I’m glad 2.4 will be coming out in the near future to let us create our own DSN’s for CF!

[QUOTE=danp5648]
You could that does not mean you should. Using datasources only
slows things down for all because all you are doing is going from java then fooling with c++ drivers then back to java again. Why not just stay inside
java and let java fool with the c++ MS drivers. Here is another example
of CFMX talking to access then back into CFMX land.

<cfset class = createObject(“java”, “java.lang.Class”)>
<cfset class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”)>
<cfset dm = createObject(“java”,“java.sql.DriverManager”)>
<cfset con = dm.getConnection(“jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c://reports.mdb”)>



<cfset isZERO = CreateObject(“java”, “coldfusion.sql.QueryTable”).init(resultSet)>

#isZERO.recordcount#

coldfusion.sql.QueryTable is the raw side fluffy CFQUERY

Sun did a good job with there only JDBC driver, so use it!
[/QUOTE]