Subject Table Unknown error
Author milesclark
Hi -

Just getting started with Firebird & the JDBC driver. I'm getting a
strange error.

I built a test database using the following script:

create database 'javatest.gdb';
connect 'javatest.gdb';
commit;

create table MYUSERS (
id integer not null primary key,
name varchar(80)
);

insert into MYUSERS (id, name) values (1, 'mmc');
insert into MYUSERS (id, name) values (2, 'joe');
insert into MYUSERS (id, name) values (3, 'fred');
commit;

I verified using isql that the data is there. I then developed a
small test java app:

import java.sql.*;
import java.util.*;
import javax.sql.*;

public class Test {
public static void main(String[] args) {
try {
Class.forName("org.firebirdsql.jdbc.FBDriver");
Connection conn =
DriverManager.getConnection("jdbc:firebirdsql:localhost/3050:E:\\misc\\firebird\\java\\javatest.gdb",
"sysdba", "masterkey");
Statement stmt = conn.createStatement();
String qry = "select * from myusers";
ResultSet rs = stmt.executeQuery(qry);
while (rs.next()) {
System.out.println(rs.getString(1) + ", " + rs.getString(2));
}
rs.close();
stmt.close();
conn.close();
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
}
}
}

When I run the Test class, I get the following error:

$ ./test.bat
java.sql.SQLException: GDSException: org.firebirdsql.gds.GDSException:
Dynamic S
QL Error
SQL error code = -204
Table unknown
MYUSERS
At line 1, column 15.
at
org.firebirdsql.jdbc.FBStatement.executeQuery(FBStatement.java:118)
at Test.main(Test.java:15)

My platform is Java 1.4.0 running on Windows 2000.

Any ideas?

Thanks in advance!

Miles Clark