Re: JDBC-ODBC-Bridge



Christian Vallant wrote:

> Hello!
>
> I have an ODBC-Driver under Linux running. Now I need a connection from
> java to the Database.
> I will use the java-odbc-bridge to connect to the server. But i get the
> following error:
>
> java.lang.NullPointerException
> at sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDriver.java:436)
> at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:153)
> at java.sql.DriverManager.getConnection(DriverManager.java:525)
> at java.sql.DriverManager.getConnection(DriverManager.java:193)
> at ProConnection.getConnection(ProConnection.java:14)
> at testmain.main(testmain.java:12)
>
> Under Openoffice2 I can connect with the ODBC-Driver to the database,
> but under java it doesn't work. Also in the console the connection works
> fine.
>
> Can anyone help me to solve the problem. I don't want to bye a jdbc
> driver, because it is very expensive and i need only a simple query from
> the database.
> I use ubuntu 5.10 and an openlink odbc-driver.
>
> Best regards
> Christian

Christian,
a little bit of more detailed information would be helpfull :

1) what database are you connecting to ? What release? (I suspect MS SQL??)
2) how do you connect ? From where, what ( code ?)
3) local or remote ?
4) what is your datasource config you are using under OO
5) how do you connect at the console ?

Maybe we can help you if we get some more meaningfull info,

Rgds,
Herman
--
Suse Linux Professional 9.2 on Athlon 1.1 Ghz 512 Mb
Anti Spam = remove the "dot" and the "at"
Registered Linux User #264690
Visit us : http://users.skynet.be/herman.timmermans
.



Relevant Pages

  • JDBC-ODBC-Bridge
    ... I have an ODBC-Driver under Linux running. ... Now I need a connection from java to the Database. ...
    (comp.lang.java.databases)
  • Re: ADO Connection Timeout
    ... so what happens when a connection failure forces one station to revert ... to a local database? ... Further, you *will* have contention issues, Jet does not support record ... to the central server, but you are willing to live with periods where it ...
    (microsoft.public.data.ado)
  • Re: ADO Connection Timeout
    ... When the first test is run, the results are stored in the central database. ... to the central server, but you are willing to live with periods where it ... i.e. a local database or even a text file. ... to function until the connection can be restored to the server. ...
    (microsoft.public.data.ado)
  • Re: ADO Connection Timeout
    ... to the central server, but you are willing to live with periods where it ... i.e. a local database or even a text file. ... to function until the connection can be restored to the server. ...
    (microsoft.public.data.ado)
  • Re: ADO Connection Timeout
    ... much rather write stored procedures and use server side cursors. ... local database, it is vital that I get the information to a central server. ... Once the connection is restored, ...
    (microsoft.public.data.ado)