Re: Error in calling stored procedure via DB link



On Wed, 3 Aug 2005 12:33:04 -0700, "Deva" <Deva@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

¤ Hi,
¤ I have a VB client that calls a stored proc sp1 in an oracle server.
¤ The stored proc sp1 inturn calls another stored sp2 in another oracle server
¤ via dblink.
¤ This works fine.
¤
¤ If I try to call the stored proc sp2 directly by saying sp2@dblink() then it
¤ fails.
¤ The error that I get is "-2147217900 : Syntax error in {call.."
¤
¤ Here is the code snippet.
¤ With oCommand
¤ .ActiveConnection = oAdoConnection
¤ .CommandType = adCmdStoredProc
¤ .CommandText = "BUILD_NUMBER@NEW_LINK"
¤ .CreateParameter("in_IDENT",adChar,adParamInput ,10,strIdent)
¤ .CreateParameter("out_NO OUT",adChar,adParamOutput ,10,strOUT)
¤ End With
¤ oCommand.Execute
¤

I believe that you need to use the Call syntax. See if the following MS KB article helps:

http://support.microsoft.com/kb/176086/


Paul
~~~~
Microsoft MVP (Visual Basic)
.



Relevant Pages

  • Re: excute stored proc in VBA
    ... ¤ i think executing the stored proc in VB and VBA are very similar. ... i'm trying to execute a stored proc stored in Sybase in VBA EXCEL 2003. ...
    (microsoft.public.vb.database.ado)
  • Re: excute stored proc in VBA
    ... this portion of the code does return the columns' labels of the ... stored proc. ... ¤ i changed the code. ...
    (microsoft.public.vb.database.ado)
  • Re: excute stored proc in VBA
    ... ¤ yes, ... this portion of the code does return the columns' labels of the ... ¤ stored proc. ...
    (microsoft.public.vb.database.ado)
  • Re: Call function
    ... ¤ If have created this function for SQL Server 2005 Express, ... Is this simular to a Stored Proc? ...
    (microsoft.public.dotnet.framework.adonet)
  • Error in calling stored procedure via DB link
    ... I have a VB client that calls a stored proc sp1 in an oracle server. ... The stored proc sp1 inturn calls another stored sp2 in another oracle server ...
    (microsoft.public.vb.database.ado)

Loading