getConnection to MS ACCESS problem
From: Avraham (niv444_at_walla.co.il)
Date: 03/30/04
- Next message: Rainer Knasar: "Re: SAPDB JDBC Driver & Trace-file"
- Previous message: Silvio Bierman: "Re: Performance: "pl/sql" vs. "OS b-tree files""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Mar 2004 02:24:00 -0800
Hello,
getConnection problem.
I run this on windows XP. I have MS ACCESS
database working well.
The problem is with trying to connect to the database (?).
The database does exist.
-----------------------------------------
import java.sql.*;
import sun.jdbc.odbc.*;
public class Test {
public static void main(String[] args) {
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}catch(java.lang.ClassNotFoundException e){
System.err.println("ClassNotFoundException: ");
System.err.println(e.getMessage());
}
String url="jdbc:odbc:ADDRBOOK";
try{
Connection con = DriverManager.getConnection(url,"","");
}catch(SQLException ex){
System.err.println("SQLException: ");
System.err.println(ex.getMessage());
}
}
}
-----------------------------------------
Here is what I get ( ignore the Hebrew characters..I can not read it
on my XP anyway)
SQLException:
[Microsoft][ODBC Driver Manager]
???? ???° ??·???? ?? ??÷? ??? ÷??? ???? ?·?? ??
???? ?°?°· ????
Press any key to continue...
--------------------------------
The first "try" does not throw an exception.
The second "try" does, why ? what should I do ?
Please help.
Thanks, Niv
- Next message: Rainer Knasar: "Re: SAPDB JDBC Driver & Trace-file"
- Previous message: Silvio Bierman: "Re: Performance: "pl/sql" vs. "OS b-tree files""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|