Hello,
I am debugging the following lines of code and am getting a "type mismatch 13" error on the Set rs = line.
Dim rs As Recordset
Set rs = CreateObject("ADODB.Recordset")
I am running MS-ACCESS 2000 and have added ADO library 2.8. I also have defined my ODBC connection to the network.
What am I doing wrong?
Thanks,
Gregg
Why are you creating an object if u have the reference checked? There is no reason to do this, just stick with new. Also u have have DAO checked and that also has a Recordset property so its always best to specify which one
eg
dim rs as ADODB.Recordset
set rs = new ADODB.Recordset
for createobject, u would typically use it this way
dim rs as object
set rs=createobject("ADODB.Recordset")
Hi Mary, long time no see :)
question for you: dont u use currentdb for DAO?
to use the current database for ado, u would use
currentproject.connection
eg
rs.Open "mysql", currentproject.connection, adOpenStatic, adLockPessimistic