Jeetu Alex - IT Software Professional specialized in developing high-end, customized business solutions using Coldfusion and Java.

Coldfusion
Java
JQuery

An online resource for latest web technologies like Coldfusion, JRun, Pro*C, JQuery, HTML5, PHP, W3C, Java, J2EE, C, C++, ORACLE, PL/SQL, MySql, Ajax, Coldbox, Fusebox, UNIX, JavaScript, NodeJS and much more...

Wednesday, November 26, 2008

CF syntax for a MySql stored procedure

http://forums.hostmysite.com/about2913.html

call getGroups()

using the DSN-less code

classLoader = createObject("java", "java.lang.Class"); classLoader.forName("sun.jdbc.odbc.JdbcOdbcDriver"); dm = createObject("java","java.sql.DriverManager"); con = dm.getConnection("jdbc:odbc:DRIVER={MySQL ODBC 3.51 Driver}; SERVER=[my server IP address]; PORT=3306; DATABASE=mysqldb; USER=testuser; PASSWORD=password; OPTION=3;"); st = con.createStatement(); rs = st.ExecuteQuery("call mysqldb.getGroups();"); q = createObject("java", "coldfusion.sql.QueryTable").init(rs);

0 comments :

Post a Comment