Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JDBC-ODBC on Unix (No suitable driver)

3 views
Skip to first unread message

DHlud

unread,
Jul 3, 2000, 3:00:00 AM7/3/00
to
    I am new to ODBC on Unix and am having a problem getting a Teradata ODBC driver working with JDBC.  My program works on WinNT 40, so I believe it should work on Unix as well, given that the ODBC profile is set up the same.  I have a sample ODBC Unix C program that uses the profile, so I believe the profile is set up correctly.

    The error message that I am getting (see code below), 'No suitable driver', occurs when calling DriverManager.getConnection().  I am at a loss.

    Is the URL ("jdbc:odbc:my_odbc_profile") that I am using incorrect?
            I do have 'my_odbc_profile' defined as a profile in my .odbc.ini file.

    Is the DriverManager not finding my .odbc.ini file?

    Any suggestions comments or tips would be greatly appreciated.
 

         Class.forName(new String("sun.jdbc.odbc.JdbcOdbcDriver"));
         i_connect = DriverManager.getConnection(new String("jdbc:odbc:my_odbc_profile"));

java.sql.SQLException: No suitable driver
        at java.sql.DriverManager.getConnection(Compiled Code)
        at java.sql.DriverManager.getConnection(DriverManager.java:149)
        at ConnectODBC.<init>(ConnectODBC.java:22)
        at ConnectODBC.main(ConnectODBC.java:137)
 

Thanks,
Dan
 
 

DHlud

unread,
Jul 3, 2000, 3:00:00 AM7/3/00
to


Thanks,
Dan

The contents of this message express only the sender's opinion.
This message does not necessarily reflect the policy or views of
my employer, Merck & Co., Inc. All responsibility for the statements
made in this Usenet posting resides solely and completely with the
sender.

Timo H Rantalaiho

unread,
Jul 4, 2000, 3:00:00 AM7/4/00
to
You posted the same message twice and the first one as both text
and HTML. Please don't do neither and cancel your unintended
posts.

> I am new to ODBC on Unix and am having a problem getting a Teradata
>ODBC driver working with JDBC. My program works on WinNT 40, so I
>believe it should work on Unix as well, given that the ODBC profile is
>set up the same. I have a sample ODBC Unix C program that uses the
>profile, so I believe the profile is set up correctly.

How does the C program access the ODBC data source? I mean, does
it somehow refer to your ~/.odbc.ini, or is there some kind of
an ODBC service running?

Unfortunately I have neither yet figured out on how to use the
JDBC-ODBC bridge on unix (well, Linux in my case). But RmiJdbc
seems like a nicer alternative anyway...

> Is the URL ("jdbc:odbc:my_odbc_profile") that I am using incorrect?

It should be fine, if it works on NT as well. You could try and
see if the behavior of the problem changes if you change the
"my_odbc_profile" part nonsense.


> Class.forName(new String("sun.jdbc.odbc.JdbcOdbcDriver"));
> i_connect = DriverManager.getConnection(new
>String("jdbc:odbc:my_odbc_profile"));

Here I don't understand why you duplicate those strings :)

>java.sql.SQLException: No suitable driver

I think that this is exactly what happens when the Jdbc-Odbc
bridge is unable to find the correct ODBC driver. You could
still try if the message changes at all if you also garble up
the "odbc" part of the URL, e.g.

"jdbc:foo:bar"

--
Timo.Ra...@helsinki.fi
* <URL: http://www.euro.cauce.org/>

Timo H Rantalaiho

unread,
Jul 4, 2000, 3:00:00 AM7/4/00
to
This doesn't solve the problem with an ODBC data source on Unix,
but with RmiJdbc,

<URL: http://www.objectweb.org/RmiJdbc/>

you can put an RmiJdbc server running on a Windows machine with
the neccessary ODBC setup and connect to it using JDBC with the
RmiJdbc driver.

DHlud

unread,
Jul 6, 2000, 3:00:00 AM7/6/00
to
Thanks for the help! Still no luck though. I am starting to think that this
driver will not work with the JDBC-ODBC Bridge.

Timo H Rantalaiho wrote:

> How does the C program access the ODBC data source? I mean, does
> it somehow refer to your ~/.odbc.ini, or is there some kind of
> an ODBC service running?

The C program doesn't reference the .odbc.ini file. The ODBC readme file that
specified that it uses the .odbc.ini file from the user home directory, if the
ODBCINI environment variable is not defined.

>
> Unfortunately I have neither yet figured out on how to use the
> JDBC-ODBC bridge on unix (well, Linux in my case). But RmiJdbc
> seems like a nicer alternative anyway...
>

Thanks for the tip. I will look into RmiJDBC.

>

> I think that this is exactly what happens when the Jdbc-Odbc
> bridge is unable to find the correct ODBC driver. You could
> still try if the message changes at all if you also garble up
> the "odbc" part of the URL, e.g.
>

I tried to change my_odbc_profile and I got the same error message. I don't get
it. Is it not finding the .odbc.ini file?

>
> "jdbc:foo:bar"

The contents of this message express only the sender's opinion.

Clemens Schulz

unread,
Jul 7, 2000, 3:00:00 AM7/7/00
to

the jdbc-odbc bridge is not available on unix, as far as i know.

use primebase or mysql with their jdbc drivers.


Tschuess und viel Spass!


John Kos

unread,
Jul 9, 2000, 3:00:00 AM7/9/00
to
The Easysoft JDBC-ODBC Bridge is a Type 3 Driver Bridge is available on
Unix. Free download at www.easysoft.com.

John Kos"Clemens Schulz" <Clemens...@kiss.antar.com> wrote in message
news:915_2000...@antares.antar.com...

Brian

unread,
Jul 11, 2000, 3:00:00 AM7/11/00
to
Make sure that you are indeed using the proper .odbc.ini file...  
 
The directory where your odbc drivers (*.so) are located should be in the library path (LD_LIBRARY_PATH).  Also, there is usually an environment variable associated with the odbc.ini file (ODBCINI).  Make sure these are set properly.
 
 
 
Brian.
 
 
    I am new to ODBC on Unix and am having a problem getting a Teradata ODBC driver working with JDBC.  My program works on WinNT 40, so I believe it should work on Unix as well, given that the ODBC profile is set up the same.  I have a sample ODBC Unix C program that uses the profile, so I believe the profile is set up correctly.

    The error message that I am getting (see code below), 'No suitable driver', occurs when calling DriverManager.getConnection().  I am at a loss.

    Is the URL ("jdbc:odbc:my_odbc_profile") that I am using incorrect?

            I do have 'my_odbc_profile' defined as a profile in my .odbc.ini file.

    Is the DriverManager not finding my .odbc.ini file?

    Any suggestions comments or tips would be greatly appreciated.
 

         Class.forName(new String("sun.jdbc.odbc.JdbcOdbcDriver"));

         i_connect = DriverManager.getConnection(new String("jdbc:odbc:my_odbc_profile"));

java.sql.SQLException: No suitable driver

0 new messages