Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Recordset update raising Multiple-step operation error with DISTINCT clause

776449Jun 1 2010 — edited Jun 18 2010
Dear All,

Urgent help need.

I am getting "Multiple-step operation generated errors." when I tried to modify the record set retrieved using a select query having DISTINCT clause. I am using Windows XP OS, with ADO 2.8 and Oracle 10G DB, Oracle Client 10.2.0.2.

A standard windows exe is created for testing using VB6 with the sample code as shown below:

Dim strSQL As String
Dim strConnString As String
Dim objCnn As New ADODB.Connection
Dim adRecordset As New ADODB.Recordset

strConnString = "Provider=OraOLEDB.Oracle;Data Source=<>;User ID=<>;Password=<>;"

objCnn.Open strConnString

strSQL = "select DISTINCT EMPNAME from EMPLOYEES where DEPT='PROD'"

adRecordset.CursorLocation = adUseClient
adRecordset.Open strSQL, objCnn, adOpenKeyset, adLockOptimistic, adCmdText

adRecordset.Fields(0).Value = "TESTING"

Set adRecordset = Nothing
objCnn.Close
Set objCnn = Nothing

The error is throwing from the line in bold type. If I remove the DISTINCT clause, the above code works fine.

The application is a ASP/COM based web application using Oracle as back end. The application was working fine till I changed the provider from Microsoft OLE DB to Oracle. Microsoft is not currently supporting the MSDAORA provider and I am forced to move to Oracle provider.

I appreciate your advice.

Regards
Krishna
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 16 2010
Added on Jun 1 2010
3 comments
1,997 views