VB6+ADO+MS Access 2000

Ramtai

New member
Local time
Today, 15:05
Joined
Sep 6, 2006
Messages
2
Hi,
I'm trying to open a recordset :

Set com = New ADODB.Command
com.ActiveConnection = gConn
com.CommandType = adCmdStoredProc
com.CommandText = "qryOPTIONS"

Set rst = New ADODB.Recordset
rst.CursorLocation = adUseServer
rst.CursorType = adOpenForwardOnly

rst.LockType = adLockPessimistic

rst.Open com

rst.MoveFirst
rst.fields(0).Value = rst.fields(0).Value

Some times it works and some times it throws an error by opening the recordset :
"Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. adUseServer Access".

The query is simple - it selects data form one table with three fields.

What could be the reason? Maybe something with locking? I lock the selected row.
 
The command object should not be used, then everything will be fine. :)
 

Users who are viewing this thread

Back
Top Bottom