RE: ADO error setting filed when using oralce hint in sql select

From: Mark Fisher (MarkFisher_at_discussions.microsoft.com)
Date: 07/22/04


Date: Thu, 22 Jul 2004 00:22:01 -0700

Thanks for your response...a hint is a special comment interpreted by the oracle databaser that indicates to oracle the sql optimisation path to use. It should be ignored by ADO entirely and only used by Oracle. However including it seems to make the first field non editable. My feeling is this is probably a buig with ADO ...does anyone have any workarounds?

"Mark Fisher" wrote:

> When using an oracle hint, the first field in the select clause becomes not editable...if you try to edit it you get error "-214717887 multiple step operation caused error. Check status of each field"
>
> without the hint all is fine.
>
> with the hint all fields other than the first field are also fine. Any ideas how to resolve?
>
>
> skeleton sample code:
>
>
> DIM rsCmd As ADODB.Recordset
> DIM rsRet As ADODB.Recordset
> Dim cmd As ADODB.Command
>
>
> With cmd
> Set .ActiveConnection = moConn
>
> cmd.commandtext = "SELECT /*+ RULE */ CODE_ID, CODE FROM CODE WHERE 1 = 0"
>
> Set rsRet = New ADODB.Recordset
>
> With rsRet
> .CursorLocation = adUseClient
> .Open cmd, , adOpenStatic, adLockBatchOptimistic
> Set .ActiveConnection = Nothing
>
> .Addnew
>
> End With
>
> Set .ActiveConnection = Nothing
> End With
>
> rsRet("CODE") = "XYZ" 'ok
> rsRet("CODE_ID") = 1 'generates the error
>
>



Relevant Pages

  • ADO error setting filed when using oralce hint in sql select
    ... When using an oracle hint, the first field in the select clause becomes not editable...if you try to edit it you get error "-214717887 multiple step operation caused error. ... DIM rsCmd As ADODB.Recordset ... Dim cmd As ADODB.Command ...
    (microsoft.public.data.ado)
  • Re: Multiple Records (CREATION)
    ... I should mention that I'd inherited this application designed in VBA and I am just trying to redo the application completely in Access since that is what I am more familiar with and this will allow better maintenance of the application. ... the job Title is a combo box that displayed the job title but it was the first field in the underlying combo query. ... The Schedule and Shift controls are also combo boxes which display the second field of the underlying query, but it is the first fields in this combo that needs to go into the table. ... Dim rst As DAO.Recordset ...
    (microsoft.public.access.modulesdaovba)
  • Re: Userform for data pull
    ... In the first field, I enter my criteria. ... > field and I get an error msg saying runtime error 424, ... > Private Sub FindButton_Click ... > Dim x As Range, ...
    (microsoft.public.excel.programming)
  • Cant read the first Field of an Excel Spreadsheet....
    ... I am using the code below to read an Excel spreadsheet and process the data. ... Unfortunately it just misses off the first field. ... Dim dr As SqlDataReader ... Dim drExcel As OleDbDataReader ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Userform for data pull
    ... In the first field, I enter my criteria. ... | field and I get an error msg saying runtime error 424, ... | Private Sub FindButton_Click ... | Dim x As Range, ...
    (microsoft.public.excel.programming)