I have an A2K project running against a SQL Server backend. I am trying to use recordsets and I get "Object variable or With block variable not set" error. I think this is related to references. I have DAO 3.6 on. Code worked before going to SQL Server. Do I need ADO references to use recordsets with SQL Server? Which ones? What is the syntax if I don't need ADO references. Code I am trying to make work is:
Dim dbs As Database
Dim rs As Recordset
Dim strsql As String
Set dbs = CurrentDb
strsql = "SELECT * FROM tblCode"
CurrentDb.Execute "strsql"
OR
Set rs = dbs.OpenRecordset("strsql"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
thanks,
vmon
Dim dbs As Database
Dim rs As Recordset
Dim strsql As String
Set dbs = CurrentDb
strsql = "SELECT * FROM tblCode"
CurrentDb.Execute "strsql"
OR
Set rs = dbs.OpenRecordset("strsql"
thanks,
vmon