Subject New JDBC driver keep throwing Dynamic SQL Error exception
Author Kenneth
Hi.

I'm not sure my previous post went through or not. Anyway...

I just downloaded the latest Type4 JDBC driver from CVS, and
found I couldn't perform even the simplest of queries.
I keep getting the following exception

java.sql.SQLException: GDSException: org.firebirdsql.gds.GDSException:
Dynamic SQL Error
SQL error code = -901
feature is not supported
at
org.firebirdsql.jdbc.FBStatement.executeQuery(FBStatement.java:118)
at TestDB.main(TestDB.java:30)

My test code is below.
For my case, exception happens when I use Statement or even
PreparedStatement.
I'm using FB V1 with JDK 1.3.1.

Regards
Kenneth


/*
* TestDB.java
*
* Created on March 20, 2002, 5:32 PM
*/

import java.sql.*;

/**
*
* @author Administrator
* @version
*/
public class TestDB {

/** Creates new TestDB */
public TestDB() {
}

/**
* @param args the command line arguments
*/
public static void main (String args[]) {
try{
Class.forName("org.firebirdsql.jdbc.FBDriver");
Connection connection =
java.sql.DriverManager.getConnection("jdbc:firebirdsql:localhost:x:/db/ncs.g
db", "SYSDBA", "masterkey");
connection.setAutoCommit(false);
Statement statement = connection.createStatement();
try {
ResultSet rs = statement.executeQuery("SELECT * FROM
MESSAGES;");
if (rs.next()) {
System.out.println(rs.getString("ID"));
}
rs.close();
}
catch (Exception e) {
e.printStackTrace();
}
statement.close();
connection.commit();
connection.close();
}
catch (Exception ex) {
ex.printStackTrace();
}
}

}