|
-
November 30th, 1999, 11:47 PM
#1
Trouble Opening a Recordset
I'm trying to open a recordset in a database but I keep getting and Error 13, Type Mismatch and I can't seem to figure out what I'm doing wrong. I've checked to ensure that the DAO 3.5 Library is checked in the Reference section. I'm working with VB5 and Win95. Here's my Code
Dim SQLStatement as string
SQLStatement = "800000_PartNumbers"
set Ws = DBEngine.Workspaces(0)
set OldDb = Ws.OpenDatabase("C:\Databases\msds_database.mdb")
set RcSet = OldDb.OpenRecordset(SQLStatement, dbOpenDynaset)
-
December 1st, 1999, 03:20 AM
#2
Re: Trouble Opening a Recordset
Hi,
I am sure you have set OLDdb as database.
It seems that 800000_PartNumbers is name of the table in the database.
Please modify your sqlstatement to
SQLStatement = "Select * from 800000_PartNumbers"
Or simply forget SQLStatement and type
set RcSet = OldDb.OpenRecordset("800000_PartNumbers", dbOpenDynaset)
I also assume that you have declared RcSet as Recordset.
Goodluck
Santulan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|