Re: Error in calling stored procedure via DB link
- From: "Deva" <Deva@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 8 Aug 2005 10:49:07 -0700
Hi Paul,
This was of great help. It worked. Thanks a lot.
Regards,
Deva.
"Paul Clement" wrote:
> On Thu, 4 Aug 2005 12:09:01 -0700, "Deva" <Deva@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> ¤ Hi Paul,
> ¤
> ¤ I tried this out now, its not working. The same error is thrown. Will dblink
> ¤ calls not be supported by ADODB?
> ¤
>
> I didn't recognize the Dblink syntax. Below is an Oracle KB article that documents the issue. I
> don't know whether this will address the use of query parameters and I don't know which driver or
> provider you are using. It's possible that Microsoft's drivers do not support this feature directly.
>
> I suppose another option would be to execute the Dblink indirectly through a stored procedure and
> call that from ADO instead.
>
>
> Doc ID: Note:186561.1
> Subject: Calling Stored Procedure over Dblink Using Oracle OleDb Provider Fails
> Type: PROBLEM
> Status: PUBLISHED
> Content Type: TEXT/X-HTML
> Creation Date: 07-NOV-2001
> Last Revision Date: 17-SEP-2002
>
> fact: Oracle Server - Enterprise Edition
> fact: Oracle Provider for OLE DB
> fact: PL/SQL
> fact: MS Windows NT
> fact: MS Windows 2000
> symptom: Calling remote stored procedure via database link
> symptom: Using ADO (ActiveX Data Object) in MS Visual Basic
> symptom: Using command type adCmdStoredProc
> symptom: Failed to execute command
> symptom: DBLINK is used
> symptom: Unspecified error
> change: NOTE ROLE:
> Enabling tracing of the OleDb provider gives the following in the trace file:
> TID: 620 (ENTRY) COracleSource::SetProperties(1, 0x6baff58)
> TID: 620 (EXIT) COracleSource::SetProperties(hr=80040e21): 4349
>
> Enabling Sql*Net client trace show no procedure call. This indicates that OleDb
> does not pass the procedure calls to the Oracle Client
> cause: To call a procedure over database link, Oracle native syntax is
> required
>
>
>
> fix:
>
> To call a stored procedure over database link, use the command type adCmdText
> to execute the command using Oracle native syntax. That is, use CommandType=
> adCmdText and BEGIN .. END syntax in the command. Other syntaxes will cause
> problems with the at-sign
>
> Oracon.Open
> cmd.ActiveConnection = Oracon
> Dim orarset As ADODB.Recordset
> Set orarset = New ADODB.Recordset
> cmd.CommandText = "BEGIN foo@v; END;"
> cmd.CommandType = adCmdText
> cmd.CommandTimeout = 0
> cmd.Execute
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)
>
.
- References:
- Error in calling stored procedure via DB link
- From: Deva
- Re: Error in calling stored procedure via DB link
- From: Paul Clement
- Re: Error in calling stored procedure via DB link
- From: Deva
- Re: Error in calling stored procedure via DB link
- From: Paul Clement
- Error in calling stored procedure via DB link
- Prev by Date: Re: Questions about ADO 2.8
- Next by Date: Re: Trouble with NULL being read into Column(x)
- Previous by thread: Re: Error in calling stored procedure via DB link
- Next by thread: How To Change FieldSize Using ADO
- Index(es):
Relevant Pages
|