Click here to Skip to main content
15,884,836 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

I am using a COM, wherein the COM has been migrated from VB6 to VB.Net.

While executing the same I am getting this error: transaction cannot have multiple recordsets with this cursor type change the cursor type vb.net when a recordset query is executing after a delete statement on the same connection is executed.

The delete query is executing as cn.Execute(strDelData)

The record set is running as : rs.Open(StrSalEmp, cn, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockOptimistic)

Don't know what cursor type to change.

Kindly help.

Thanks & Regards
Varun

What I have tried:

rs.Open(StrSalEmp, cn, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic)
Posted
Comments
Richard Deeming 15-Feb-17 12:02pm    
Are you sharing a single connection object across multiple calls?

Have you considered using ADO.NET[^] instead?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900