Subject | error code 335544569 |
---|---|
Author | Philip Bennett |
Post date | 2002-07-25T05:09:35Z |
I get an "GDS Exception: org.firebirdsql.gds.GDSException: No message for
code 335544569 found"
When I run the test code below, through the same sql statement works in IB
Experts.
Philip Bennett
import java.sql.*;
public class TestSQL {
public static void main(String args[]) throws Exception {
String sql =
"create table vertex (creationDate DATE, name VARCHAR(50) not null
unique,"
+ " strength FLOAT, version_number INTEGER not null, id NUMERIC(18,0)
not null,"
+ " type VARCHAR(100) not null, primary key (id))";
System.out.println(sql + "\n");
try {
Driver driver =
(Driver) Class
.forName("org.firebirdsql.jdbc.FBDriver")
.newInstance();
Connection connection =
DriverManager.getConnection(
"jdbc:firebirdsql:localhost/3050:c:\\databases\\test.gdb",
"sysdba",
"masterkey");
Statement st = connection.createStatement();
ResultSet rs = st.executeQuery(sql);
rs.close();
connection.close();
} catch (java.lang.ClassNotFoundException e) {
System.out.println(e.getMessage());
return;
} catch (java.lang.IllegalAccessException e) {
// A call to newInstance() forces us to consider this exception :-)...
System.out.println(
"Unable to access driver constructor, this shouldn't happen!");
System.out.println(e.getMessage());
return;
} catch (java.lang.InstantiationException e) {
// A call to newInstance() forces us to consider this exception :-)...
// Attempt to instantiate an interface or abstract class.
System.out.println(
"Unable to create an instance of driver class, this shouldn't happen!");
System.out.println(e.getMessage());
return;
} catch (java.sql.SQLException e) {
showSQLException(e);
return;
}
}
// Display an SQLException which has occured in this application.
private static void showSQLException(java.sql.SQLException e) {
// Notice that a SQLException is actually a chain of SQLExceptions,
// let's not forget to print all of them...
java.sql.SQLException next = e;
while (next != null) {
System.out.println(next.getMessage());
System.out.println("Error Code: " + next.getErrorCode());
System.out.println("SQL State: " + next.getSQLState());
next = next.getNextException();
}
}
}
code 335544569 found"
When I run the test code below, through the same sql statement works in IB
Experts.
Philip Bennett
import java.sql.*;
public class TestSQL {
public static void main(String args[]) throws Exception {
String sql =
"create table vertex (creationDate DATE, name VARCHAR(50) not null
unique,"
+ " strength FLOAT, version_number INTEGER not null, id NUMERIC(18,0)
not null,"
+ " type VARCHAR(100) not null, primary key (id))";
System.out.println(sql + "\n");
try {
Driver driver =
(Driver) Class
.forName("org.firebirdsql.jdbc.FBDriver")
.newInstance();
Connection connection =
DriverManager.getConnection(
"jdbc:firebirdsql:localhost/3050:c:\\databases\\test.gdb",
"sysdba",
"masterkey");
Statement st = connection.createStatement();
ResultSet rs = st.executeQuery(sql);
rs.close();
connection.close();
} catch (java.lang.ClassNotFoundException e) {
System.out.println(e.getMessage());
return;
} catch (java.lang.IllegalAccessException e) {
// A call to newInstance() forces us to consider this exception :-)...
System.out.println(
"Unable to access driver constructor, this shouldn't happen!");
System.out.println(e.getMessage());
return;
} catch (java.lang.InstantiationException e) {
// A call to newInstance() forces us to consider this exception :-)...
// Attempt to instantiate an interface or abstract class.
System.out.println(
"Unable to create an instance of driver class, this shouldn't happen!");
System.out.println(e.getMessage());
return;
} catch (java.sql.SQLException e) {
showSQLException(e);
return;
}
}
// Display an SQLException which has occured in this application.
private static void showSQLException(java.sql.SQLException e) {
// Notice that a SQLException is actually a chain of SQLExceptions,
// let's not forget to print all of them...
java.sql.SQLException next = e;
while (next != null) {
System.out.println(next.getMessage());
System.out.println("Error Code: " + next.getErrorCode());
System.out.println("SQL State: " + next.getSQLState());
next = next.getNextException();
}
}
}