I have a source file which creates and populates the database, I wolud like to be able to call this file from withing my application program using the ODBC connector. However when I try I just get error 1064.
My application is in java .. here is the code snippet concerned..
My application is in java .. here is the code snippet concerned..
Code:
try {
Statement st = con.createStatement();
sqlquery = "source c:\\mysql\\bin\\rj_create.sql";
rs = st.executeQuery(sqlquery);
try {
while (rs.next()){
System.out.println(rs.getString(1));
}
} catch (SQLException se) {
System.err.println("reading SQLException: " + se.getMessage()) ;
System.err.println(sqlquery);
}
} catch (SQLException e){
System.err.println("querying SQLExcpetion " + e.getMessage());
System.err.println("err code " + e.getErrorCode());
System.err.println(sqlquery);
}