JDBC-ODBC -> MS Access internal error

JDBC-ODBC -> MS Access internal error

Post by Lutz Hankewi » Fri, 16 Jan 1998 04:00:00



hello,

has anybody had the same problem?

here the problem:

tried to connect (with the sample program of the javasoft-getting-started-
with-jdbc page) to a ms access database over the jdbc-odbc-bridge included
in visual age for java (jdk 1.1) and got an internal error EX02 during
the call of

sun.jdbc.odbc.JdbcOdbc.allocEnv(byte []) in
sun.jdbc.odbc.JdbcOdbcDriver.initialize()

the code is as follows:
...
String url = "jdbc:odbc:MPS_N";
String query = "SELECT * FROM PC";

try {
   CLASS.forName("sun.jdbc.odbc.JdbcOdbcDriver");
   DriverManager.setLogStream(System.out);
   Connection con = DriverManager.getConnection(url, "admin", "");
   // here i get the internal error
...

Quote:}

can the reason be the configuration of odbc? the database "MPS_N" is
a datasource in odbc on the drive d:\path\mps_n.mdb, with user "admin" and
password "".

has anybody any idea or knows where i can get any hint.

thanks in advance and a happy day :)

lutz hankewitz

 
 
 

JDBC-ODBC -> MS Access internal error

Post by Mohamed Almubara » Fri, 16 Jan 1998 04:00:00


I'm not sure,but I think this should

    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
     ^^^^^
    Notice the cabs in yours

CLASS.forName("sun.jdbc.odbc.JdbcOdbcDriver");

    maybe :-)

    Mohamed Almubarak


> hello,

> has anybody had the same problem?

> here the problem:

> tried to connect (with the sample program of the javasoft-getting-started-
> with-jdbc page) to a ms access database over the jdbc-odbc-bridge included
> in visual age for java (jdk 1.1) and got an internal error EX02 during
> the call of

> sun.jdbc.odbc.JdbcOdbc.allocEnv(byte []) in
> sun.jdbc.odbc.JdbcOdbcDriver.initialize()

> the code is as follows:
> ...
> String url = "jdbc:odbc:MPS_N";
> String query = "SELECT * FROM PC";

> try {
>    CLASS.forName("sun.jdbc.odbc.JdbcOdbcDriver");
>    DriverManager.setLogStream(System.out);
>    Connection con = DriverManager.getConnection(url, "admin", "");
>    // here i get the internal error
> ...
> }

> can the reason be the configuration of odbc? the database "MPS_N" is
> a datasource in odbc on the drive d:\path\mps_n.mdb, with user "admin" and
> password "".

> has anybody any idea or knows where i can get any hint.

> thanks in advance and a happy day :)

> lutz hankewitz

--
---------------------------------------------------------------
  Mohamed Almubarak
Arab Poems:  http://mason.gmu.edu/~malmubar
---------------------------------------------------------------

 
 
 

JDBC-ODBC -> MS Access internal error

Post by Lutz Hankewi » Sat, 17 Jan 1998 04:00:00


furthr specification of the problem:
visual age used under win95, with odbc2.0 for windows 3.1!? and access 2.0

can it bee, that the jdbc-odbc-bridge of java 1.1 under win95 only works
with the odbc-driver for access95?

just a guess.

lutz

 
 
 

JDBC-ODBC -> MS Access internal error

Post by etta » Sun, 18 Jan 1998 04:00:00


correct one is a 16 bit dirver and the other is a 32bit driver. Java1.1
needs a
32bit driver.

etta



Quote:> furthr specification of the problem:
> visual age used under win95, with odbc2.0 for windows 3.1!? and access
2.0

> can it bee, that the jdbc-odbc-bridge of java 1.1 under win95 only works
> with the odbc-driver for access95?

> just a guess.

> lutz

 
 
 

1. JDBC-ODBC + MS Access ---------> Problem

I did two steps:

"1) Configured a DSN for my database, like I would do it for any ODBC
client access.

2) Connected like the following code - all JDBC commands in try-blocks -
for the best use one own try-catch for each command:

// Loaded driver class
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );

// Connected - DSN is "myDSN", user is "myUser", password is "myPW"
Connection Con = DriverManager.getConnection(
  "jdbc:odbc:myDSN", "myUser", "myPW" );"

But it does not work properly. The error is similar to:

SQLException: [Microsoft] [ODBC driver manager] Data Name Source not
found and no default ODBC driver

What else should I do ?

MarYo

2. What is Postgres?

3. JDBC/ODBC MS:Access Syntax error in INSERT INTO

4. DB-library

5. JDBC Driver for MS Access (Not JDBC-ODBC Driver)

6. finding relationships

7. Oracle->ODBC->MS-ACCESS problem, need help

8. MS Visual Basic -> MS Access via ODBC

9. Applet, JDBC-ODBC and MS ACCESS and MS SQL server

10. Accessing MS Access on a server with ODBC JDBC Bridge

11. JDBC<->ODBC Driver against MS SQLServer fails with NULLs

12. Function sequence error accessing MS Access db over jdbc