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
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.
In <3960E72E...@merck.com> DHlud <daniel_h...@merck.com> writes:
> 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/>
<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.
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"
>
> --
> Timo.Ra...@helsinki.fi
> * <URL: http://www.euro.cauce.org/>
The contents of this message express only the sender's opinion.
use primebase or mysql with their jdbc drivers.
Tschuess und viel Spass!
John Kos"Clemens Schulz" <Clemens...@kiss.antar.com> wrote in message
news:915_2000...@antares.antar.com...
DHlud <daniel_h...@merck.com> wrote in message news:3960E6A4...@merck.com...
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