Subject | Re: [Firebird-Java] Table Unknown error |
---|---|
Author | David Jencks |
Post date | 2002-05-20T01:31:18Z |
Several people have had problems viewing data consistently between isql and
java -- I've had problems both with the jca-jdbc driver and Interclient.
Have you closed isql when you run the java program? That often seems to
help.
You might try doing all your work in java.
The cause of these problems seems to remain mysterious. I think there may
be some odd transaction setting in isql causing it.
david jencks
java -- I've had problems both with the jca-jdbc driver and Interclient.
Have you closed isql when you run the java program? That often seems to
help.
You might try doing all your work in java.
The cause of these problems seems to remain mysterious. I think there may
be some odd transaction setting in isql causing it.
david jencks
On 2002.05.19 21:04:35 -0400 milesclark wrote:
> 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
>
>
>
>
>
> To unsubscribe from this group, send an email to:
> Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>