Upsizing problem

  • Thread starter Thread starter bill2332
  • Start date Start date
B

bill2332

Hi all,

I have written an access database and have upsized it to
work with a SQL backend. The problem is that now my app
doesn't work. It specifically hangs on when i try and
open a recordset. My syntax is as follows:

dim db as database
dim rst as recordset
dim s as string

db = currentdb
s = "SELECT * FROM [mytable]"
set rst = db.Openrecordset(s)

This last line gives me the following error:

Run-time error '91'
Object variable or With block variable not set


Whats the problem? I think it has something to do with
Jet migrating to Transact-SQL

Please help....
 
---------- "(e-mail address removed)"
I have written an access database and have upsized it to
work with a SQL backend. The problem is that now my app
doesn't work. It specifically hangs on when i try and
open a recordset. My syntax is as follows:

dim db as database
dim rst as recordset
dim s as string

db = currentdb
s = "SELECT * FROM [mytable]"
set rst = db.Openrecordset(s)

This last line gives me the following error:

Run-time error '91'
Object variable or With block variable not set

Bill,

try these:
1. Open a module in design view, go to Tools /References and set a
reference to the Microsoft DAO object library.
2. Fully reference all DAO objects when Dimming (should be done anyway
for clarity and to avoid DAO/ADO confusions):
dim db as DAO.database
dim rst as DAO.recordset

Best regards
Emilia

Emilia Maxim
PC-SoftwareService, Stuttgart
http://www.maxim-software-service.de
 
Back
Top