ADO Connection between 2 MS Access Database
Hi, need some help here...
I am currently doing up a MS Access tool. (Coding in the VBA environment in MS Access)
Currently, I have 2 MS Access Database file (File1.mdb and File2.mdb).
From File1.mdb, I need to connect to File2.mdb to extract certain data (in Table2).
An ODBC Link using Data Source Name was set up and I used the following codes (in a form from File1.mdb)
================================================== ===
1 dim con as new adodb.connection
2 dim rec as new adodb.recordset
3 con.Open "DSN=TABLE_REQUIRED"
4 rec.Open "SELECT * FROM data", con, adOpenDynamic, adLockReadOnly
================================================== ===
I have no problems getting the connection up, but I keep getting the following error message which is not allowing me to open the recordset that I need:
[Microsoft][ODBC Microsoft Access Driver] Record(s) cannot be read; no read permission on 'data'.
I have alread enable all access rights for all user to File2.mdb
Hence, I am not sure why I still can't get the recordset opened!
Any help is greatly appreciated!
Scripts82
__________________
Scripts82
|