RE: ADO error setting filed when using oralce hint in sql select
From: Mark Fisher (MarkFisher_at_discussions.microsoft.com)
Date: 07/22/04
- Next message: AntiTrust: "Re: Osama Found Hanged - Contains HackArmy Virus"
- Previous message: ZAky: "Datagrid WinForms Rowchanged event"
- In reply to: Mark Fisher: "ADO error setting filed when using oralce hint in sql select"
- Messages sorted by: [ date ] [ thread ]
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
>
>
- Next message: AntiTrust: "Re: Osama Found Hanged - Contains HackArmy Virus"
- Previous message: ZAky: "Datagrid WinForms Rowchanged event"
- In reply to: Mark Fisher: "ADO error setting filed when using oralce hint in sql select"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|