on 11-22-2006 4:38 AM
Hi Everyone,
I am implementing simple File to JDBC scenario. The sender file adpater is working fine, but the receiver JDBC adapter seems to be causing a bit of problems.
I am using MS Access as the data base. Database XI.mdb is in D:/JDBC/XI.mdb
The parameters in JDBC adapter that i have filled are:
<b>Connection String:</b> <i><b>jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=//132.186.85.184/D:/JDBC/XI.mdb;</b></i>
<b>JDBC Adapter:</b> <i><b>sun.jdbc.odbc.JdbcOdbcDriver</b></i>
<b>Persistence:</b> <i><b>local</b></i>
<b>Conflict Resolution:</b> <i><b>redo</b></i>
<b>Interprtation of empty string values:</b> <i><b> "</b></i>
These are the only fields filled up in the receiver JDBC adapter.
Now the error that i am getting in JDBC communication channel is:
<i><b>Error during database connection to the database URL 'jdbc:odbc:Driver={Microsoft Access Driver (.mdb)};DBQ=//132.186.85.184/JDBC/XI.mdb;' using the JDBC driver 'sun.jdbc.odbc.JdbcOdbcDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:odbc:Driver={Microsoft Access Driver (.mdb)};DBQ=//132.186.85.184/JDBC/XI.mdb;': SQLException: [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xde8 Thread 0x9b28 DBC 0x5156024 Jet'.'</b></i>
Pls advice.
Regards,
Ashish
Message was edited by:
Ashish Goyal
Did you test the standalone program on the XI or on your local system?
From the path of your posting, I'd suppose the latter.
This could lead to the source of the error.
I don't know your sharing details, but I assume that you haven't shared your partition "D:" with the share name "D:". Instead, you maybe shared the directory "JDBC" with the share name "JDBC". In this case, the correct link to the MS Access file probably is:
//132.186.85.184/JDBC/XI.mdb instead of //132.186.85.184/<u><b>D:/</b></u>JDBC/XI.mdb
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try giving the path like this
//132.186.85.184/D/JDBC/XI.mdb
instead of
//132.186.85.184/D:/JDBC/XI.mdb
Regards,
Sundar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As per the link you sent me, I should stop using ODBC drivers and install Jet drivers:
<i><b>First thing you should do, is stop using ODBC drivers. If you use the JET OLE DB drivers instead (see Article #2126 for a sample connection string), at the very least you'll get a more meaningful error message. Also make sure to apply the most recent MDAC update (MDAC Download Page) and the most recent JET drivers (see Article #2342).</b></i>
From where do i get these drivers and where should i install them
what would be my connection string and Driver string in JDBC adapter?
Regards,
Ashish
Hi,
refer this link.
Refer this link to solve the above error.
http://support.microsoft.com/kb/295297
Regards,
Sudheer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sudheer,
I went to registry and added myself with full control, but still i am getting the same error.
Also i am able to access the MS access from satndalone java program, using the following code:
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
public class AccessJdbc {
public static void main(String[] args) {
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=D:/JDBC/XI.mdb";
Connection con = DriverManager.getConnection( database ,"","");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("select * from xi");
while(rs.next())
System.out.println(rs.getString(1)" - "rs.getString(2));
System.out.println("Success");
}catch(Exception e)
{
System.out.println(e.toString());
}
}
}
Regards,
Ashish
Hi,
Try accesing the database with stand alone JAVA program. If it works properly then its some thing in XI. If not then its some problem with system registry.
regards,
P.Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this simple code.
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=//132.186.85.184/D:/JDBC/XI.mdb";
Connection con = DriverManager.getConnection( database ,"","");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("some select query");
while(rs.next())
System.out.println(rs.getString(1));
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.