Microsoft KB Archive/255707

= PRB: Error 800a0cb3 on AddNew or Update Method When Using Microsoft Oracle OLE DB Provider =

Article ID: 255707

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Microsoft OLE DB Provider for Oracle Server 1.0
 * Microsoft OLE DB Provider for Oracle Server 1.0
 * Microsoft OLE DB Provider for Oracle Server 1.0
 * Microsoft OLE DB Provider for Oracle Server 1.0

-



This article was previously published under Q255707



SYMPTOMS
When you perform updates or add new records to an Oracle database by using Microsoft ActiveX Data Objects (ADO), the following error may occur:

ADODB.Recordset (0x800A0CB3)

Object or provider is not capable of performing requested operation.



CAUSE
This error message is generated because the Oracle OLE DB Provider does not support server-side updates.



RESOLUTION
You must use client-side cursors to perform updates against an Oracle database by using the Microsoft Oracle OLE DB Provider. To do this, before opening the recordset, specify the CursorLocation property to equal adUseClient (or the number "3").



STATUS
This behavior is by design.



Steps to Reproduce Behavior
To reproduce this behavior, perform the following steps:   Create a sample table in Oracle with some data by using the following SQL statements: CREATE TABLE MYACCT (ACCT_NUM  NUMBER  CONSTRAINT pk_Acct_Num PRIMARY KEY,         CUST_NUM   NUMBER,         ACCT_NAME  VARCHAR2(255))

INSERT INTO MYACCT VALUES(111,111,'Barry Blue')   Insert the following code into a new Microsoft Active Server Pages (ASP) page: <%@ Language=VBScript %>

<%' Replace the above two lines with the following lines to use MDAC 2.6 ' '%>    

 <%   Dim cn, rs    Set cn = Server.CreateObject("ADODB.Connection") Set rs = Server.CreateObject("ADODB.Recordset") cn.Open "Provider=MSDAORA.1;Password=tiger;User ID=scott;Data Source=YourDataSource;" ' rs.CursorLocation = adUseClient ' Uncomment this line to cause this code to work properly. rs.Open "SELECT * FROM MYACCT", cn, adOpenKeyset, adLockOptimistic rs("ACCT_NUM")=333 rs("CUST_NUM")=333 rs("ACCT_NAME")="barry white" rs.Update

%>

 </HTML> </li> Save the page in a folder that is part of a Web application in Internet Information Server (IIS).</li> Browse to the page using Internet Explorer.</li></ol>

Keywords: kbdatabase kbprb KB255707

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.