Calling Transact SQL stored procedure via Transparent Gateway [message #47078] |
Wed, 21 July 2004 05:01 |
Elena
Messages: 14 Registered: December 2000
|
Junior Member |
|
|
I have SQL stored procedure dbo.dajOznakaVal with input parametar (integer) and output parametar (char)
CREATE PROCEDURE dbo.DajOznakaVal @valuta int
AS
select oznaka from valuti (nolock) where sifra=@valuta
GO
The table VALUTI has records SIFRA type char(3) and OZNAKA type char(3).
When I try to execute exec dbo.dajOznakaVal@testlink(978) using the PL/SQL command window I keep receiving the following message:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'DAJOZNAKAVAL'
ORA-06550: line 1, column 7:
But when try the select oznaka from valuti@testlink where sifra=978 in the PL/SQL SQL window I have the correct result EUR!
For establishing the database connection and setting the parametars in the initial files I was using the book ‘Oracle Transparent Gateway for Microsoft SQL Server”!
|
|
|
|
|
Re: Calling Transact SQL stored procedure via Transparent Gateway [message #47088 is a reply to message #47084] |
Thu, 22 July 2004 00:37 |
Tak Tang
Messages: 142 Registered: May 2004
|
Senior Member |
|
|
Elena,
Thats really cool! I didn't realise Oracle was that savvy. Try this from SQL*Plus :-
VARIABLE r REFCRUSOR
EXEC dbo.dajOznakaVal@testlink(978, :r);
PRINT r
Refcursors are quite a big (and very cool) subject - more so than I can do justice to. I noticed that you also posted this question on Oracle Technology Network. If you post the description there, you'll get lots and lots of help on refcursors.
Tak
|
|
|
|
|