Hi All,
Thanks for your attention..I appreciate that.
-----Problem description -----------Start----------------------
Database : DB2 UDB 8.2 on Windows 2003
Client: VB6/ADO 2.7 on Windows 2003
1) I am opening a ADO 2.7 recordset with following settings
SQL Source : "select * from <<sometable>>" //
<<sometable>>
has a PK
CursorLocation : adUseClient
CursorType : KeySet
LockType : BatchOptimistic or Optimistic
UpdateMethod : Update() or UpdateBatch()
2) After opening the recordset
2.1) Add a record using AddNew method
2.2) Assign Values
2.3) Call Update Or UpdateBatch()
2.4) I can see the recordcount incremented by 1 ...
2.5) I close the recordset
2.6) I assign Nothing to RecordSet.Active Connection property.
3) I Go in command Editor and tried to see my added record using
"select *
from <<sometable>>" and the Command Editor times out
with following error : Error: [IBM][CLI Driver] CLI0125E Function
sequence
error. SQLSTATE=S1010
4) I now must stop and start db2 service to execute "select * from
<<sometable>>" successfully again..however record added in step 2 is
not
there.
-----Problem description -----------END----------------------
My Research :
-----------------------
I tried DB2 documentation and S1010 does not exist in db2 documentation
CLI0125E has very general message that sequence of function call is
wrong.
Anyway I tried more on internet and following interesting
cases/suggested
solutions ...though nothing are recent and deal with UDB 8.2 and
nothing
worked in my case
1) changing CURSORHOLD property to 0. Db2 documentation explanation
makes
sense of this solution that by default all cursor open with Db2 kept
open
until Rolled back. Setting CURSORHOLD to 0 will change this behavior. I
did
that but no change
2) Set Autocommit to False ..tried with Both AutoCommit to true and
false
while CursorHOLD was set to 0 ..did not work.
3) Use IBM OLEDB driver or better still use MS OLE DB provider for ODBC
driver...tried that and did not worked.
Please help.
-TIA