
"no open cursor or cursor closed" when using Addnew for Remote Data Objects
A DELETE is an action query: it doesn't really create a resultset. Use
the rdoConnection's Execute method to run action queries.
If you want to use AddNew-Update to insert rows, you need to create a
resultset using something like "SELECT * FROM tblImportTable".
Personally, I prefer using INSERT queries to add rows (again, using the
Execute method), but to each his/her own.
Quote:
> I get the error "no open cursor or cursor closed" on the last line in
> the following code:
> Set WS = rdoEngine.rdoEnvironments(0)
> Set DB = WS.OpenConnection("Access Files")
> Set RS = DB.OpenResultset("Delete * From tblImportTable", rdOpenDynamic)
> RS.AddNew
> I'm pretty new to VB and databases and am confused if this is happenning
> becuase of the "rdOpenDynamic" parameter or not.. I'm just trying to add
> a new record to my table. Any help would be appreciated.
> Kushal Khan