Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Q: Connect with JDBC
Has anybody done a connect to Oracle8 (or anything else).
If got some serious problems with it and would appriciate some help on this
topic.
My application looks like this:
import java.sql.*;
public class HelloWorld{
public static void main(String[] args){
Connection lo_OracleConnection;
System.out.println("Hello World!");
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
}
System.out.println("Hello Driver!");
String lsURL = "jdbc:odbc:TEST01";
String lsUser = "scott";
String lsPassword = "tiger"; System.out.println("Hello " + lsURL); System.out.println("Hello " + lsUser); System.out.println("Hello " + lsPassword);try{
And produces this output:
Hello World!
Hello Driver!
Hello jdbc:odbc:TEST01
Hello scott
Hello tiger
SQLException: [Microsoft][ODBC Driver Manager] Data source name not found
and no
default driver specified
Bye Oracle!
I use the ODBC driver from Oracle,
the JDBC Bridgedriver shipped with jdk1.1.5
Thanks for the help.
Jens.Schauder_at_opal-edv.com Received on Fri Apr 17 1998 - 06:41:19 CDT
![]() |
![]() |