A
Albretch
I am trying to establish a jdbc connection to a MSAccess file-based
DBs.
The JdbcOdbcDriver gives me no problems, but the IDS does. I have
read their user guide docs, their faqs and tried all possible
permutations or parameters to no avail.
What could be the problem here?
Have you been successful at connecting to a MS Access DB with the IDS
JDBC driver?
// - - - - - - - THIS IS FINE - - - - - - -
String aDrvr = "sun.jdbc.odbc.JdbcOdbcDriver";
String aCxURL = "jdbc
dbc
river={MicroSoft Access Driver
(*.mdb)};DBQ=C:\Program Files\Microsoft
Office\Office\Samples\Northwind.mdb";
String aUsr = "msaccess2000_JdbcOdbc";
String aPW = "wordpass";
.. . .
try{
// __ Setting Driver
Class.forName(aDrvr).newInstance();
Cx = DriverManager.getConnection(aCxURL, aUsr, aPW);
if(Cx != null){
Cx.close(); Cx = null; IsCx = true;
System.err.println(" Connection Succesfull!");
}
// __
}catch(ClassNotFoundException KNF){ KNF.printStackTrace(); }
catch(InstantiationException InstX){ InstX.printStackTrace(); }
catch(IllegalAccessException IlglAX){ IlglAX.printStackTrace(); }
catch(SQLException SQLX){ SQLX.printStackTrace(); }
.. . .
// - - - - - - - THIS ISN'T - - - - - - -
String aDrvr = "ids.sql.IDSDriver";
String aCxURL = "jdbc:ids://127.0.0.1:12/conn?dsn='DRIVER={Microsoft
Access Driver (*.mdb)};DBQ=C:\Program Files\Microsoft
Office\Office\Samples\Northwind.mdb'";
String aUsr = "msaccess2000_JdbcOdbc";
String aPW = "wordpass";
java.sql.SQLException: java.net.ConnectException: Connection refused:
connect
at ids.sql.IDSSocket.onException(IDSSocket.java:212)
at ids.sql.IDSConnection.<init>(IDSConnection.java:251)
at ids.sql.IDSDriver.connect(IDSDriver.java:93)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
.. . .
tried also
"jdbc:ids://localhost:12/conn?dsn='DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=C:\Program Files\Microsoft
Office\Office\Samples\Northwind.mdb'";
and many other variations . . .
DBs.
The JdbcOdbcDriver gives me no problems, but the IDS does. I have
read their user guide docs, their faqs and tried all possible
permutations or parameters to no avail.
What could be the problem here?
Have you been successful at connecting to a MS Access DB with the IDS
JDBC driver?
// - - - - - - - THIS IS FINE - - - - - - -
String aDrvr = "sun.jdbc.odbc.JdbcOdbcDriver";
String aCxURL = "jdbc
(*.mdb)};DBQ=C:\Program Files\Microsoft
Office\Office\Samples\Northwind.mdb";
String aUsr = "msaccess2000_JdbcOdbc";
String aPW = "wordpass";
.. . .
try{
// __ Setting Driver
Class.forName(aDrvr).newInstance();
Cx = DriverManager.getConnection(aCxURL, aUsr, aPW);
if(Cx != null){
Cx.close(); Cx = null; IsCx = true;
System.err.println(" Connection Succesfull!");
}
// __
}catch(ClassNotFoundException KNF){ KNF.printStackTrace(); }
catch(InstantiationException InstX){ InstX.printStackTrace(); }
catch(IllegalAccessException IlglAX){ IlglAX.printStackTrace(); }
catch(SQLException SQLX){ SQLX.printStackTrace(); }
.. . .
// - - - - - - - THIS ISN'T - - - - - - -
String aDrvr = "ids.sql.IDSDriver";
String aCxURL = "jdbc:ids://127.0.0.1:12/conn?dsn='DRIVER={Microsoft
Access Driver (*.mdb)};DBQ=C:\Program Files\Microsoft
Office\Office\Samples\Northwind.mdb'";
String aUsr = "msaccess2000_JdbcOdbc";
String aPW = "wordpass";
java.sql.SQLException: java.net.ConnectException: Connection refused:
connect
at ids.sql.IDSSocket.onException(IDSSocket.java:212)
at ids.sql.IDSConnection.<init>(IDSConnection.java:251)
at ids.sql.IDSDriver.connect(IDSDriver.java:93)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
.. . .
tried also
"jdbc:ids://localhost:12/conn?dsn='DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=C:\Program Files\Microsoft
Office\Office\Samples\Northwind.mdb'";
and many other variations . . .