scotts27
asked on
Another Simple Database connection
I have the following code that I swear was working. Now I get a type mismatch error. Can anyone shed some light on this..
Dim rs_test_import As New Recordset
Dim booksdb As Database
Set booksdb = OpenDatabase("books2.mdb")
Set rs_test_import = booksdb.OpenRecordset("tes t_import", dbOpenDynaset)
I am getting the type mismatch on the last line.
Dim rs_test_import As New Recordset
Dim booksdb As Database
Set booksdb = OpenDatabase("books2.mdb")
Set rs_test_import = booksdb.OpenRecordset("tes
I am getting the type mismatch on the last line.
ASKER
Thanks. It is the name of the table.
Your code seems to be working fine!!! Can you explain me more about your problem?
Are you using Access97 or Access2000?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There maybe a problem with the reference. Do you reference both ADO and DAO in your app? If so, you have to prefixed your declaration this way:
Dim rs_test_import As DAO.Recordset
Dim rs_test_import As DAO.Recordset
if you are not using ADO then no no need to use ADO Reference
What is "test_import"??? Is it the table or sql?