Click here to Skip to main content
13,899,799 members
Rate this:
Please Sign up or sign in to vote.
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 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

What I have tried:

rs.Open(StrSalEmp, cn, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic)
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web04 | 2.8.190306.1 | Last Updated 15 Feb 2017
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100