Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic recordset object producing error

Status
Not open for further replies.

Frank72

Technical User
Nov 13, 2001
57
0
0
IE
hows it going

I am trying to use the dynamic recordset object to open a table to which i want to append , it is an ODBC table linked from an AS/400 database and so should (i think) be working.
it is returning err msg 3001 invalid argument. either i'm supposedly using 2 mutually exclusive types or maybe a dll problem. here's a sample of the code any help greatly appreciated.

Dim DefaultDate As Date
Dim Dbase As Database
Dim RstLog, RstCtl, Rst3 As Recordset

Set Dbase = DBEngine.Workspaces(0).Databases(0)
Set RstCtl = Dbase.OpenRecordset("KHPRDDTA_TBLXFERCTL", dbOpenSnapshot)
Set RstLog = Dbase.OpenRecordset("KHPRDDTA_TBLXFERLOG", dbOpenDynamic)
Set Rst3 = Dbase.OpenRecordset("khprddta_tblvehicle", dbOpenSnapshot)

thanks + happy christmas

frank
 
dbOpenDynamic only applies to a ODBCDirect workspace. You are using a Jet workspace.
Use dbOpenDynaset instead.

M *<:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top