recordsets collection doesn´t work

blazen

New member
Local time
Today, 00:00
Joined
Oct 31, 2000
Messages
6
I am trying to use recordsets collection in the following code, but it doesn´t work. The database always reports an error - either "Type mismatch" or "need parameter".The code is Dim dbs as database,rec as recordset // set dbs = currentdb // set rec = dbs.openrecordset("tablename")
 
Is the table a linked one. If so you need :

set rec = dbs.openrecordset("tablename",DB_OPEN_DYNASET)
 
Sorry chilluk: DB_OPEN_DYNASET is default (no need to give) and is an old Access95-constant.

Blazen: your code should work!
Some ideas:
Does "tablename" really refer to a table?
Is table "tablename" an MS-Access-table in this or another .mdb-file? Or is it an ODBC/FoxPro/... table?
Do you use Access97 (in Access2000 you need Dao.Recordset or ADODB.Recordset)?
 

Users who are viewing this thread

Back
Top Bottom