LordOfCode
Programmer
Hello everyone!
Currently I am developing a distribuited application for a local bank in my country. In this moment I am developing the business layer using stored procedures in SQL Server 2000, but I have to use data from different data sources, including Oracle and other SQL Servers. I have created linked servers for all of them. Now I face problem that I need to call an Oracle Stored Procedure through one of this linked servers, but it does not work or I do not know how to do it.
I am going to paste an example of what I am tryng.
This is oracles stored procedure code
...which queries this table
Then I created an Oracle linked server from Enterprise Manager and wrote this code
The first query does work. But the stored procedure calling does not. Any help? Any Idea?
I thank your help beforehand.
edalorzo@hotmail.com
Currently I am developing a distribuited application for a local bank in my country. In this moment I am developing the business layer using stored procedures in SQL Server 2000, but I have to use data from different data sources, including Oracle and other SQL Servers. I have created linked servers for all of them. Now I face problem that I need to call an Oracle Stored Procedure through one of this linked servers, but it does not work or I do not know how to do it.
I am going to paste an example of what I am tryng.
This is oracles stored procedure code
Code:
CREATE OR REPLACE PROCEDURE EDALORZO.HELLO
(friendCode IN number,friendName OUT varchar)
IS
BEGIN
select NOM_AMIGO into friendName from AMIGOS where COD_AMIGO = friendCode;
END;
...which queries this table
Code:
CREATE TABLE EDALORZO.AMIGOS (
COD_AMIGO NUMBER(3,0) NOT NULL,
NOM_AMIGO VARCHAR2(60) NULL,
PRIMARY KEY(COD_AMIGO)
)
Then I created an Oracle linked server from Enterprise Manager and wrote this code
Code:
select * from oracle..EDALORZO.AMIGOS
go
declare @data varchar(60)
execute oracle..EDALORZO.HELLO 1,@data OUTPUT
print @data
go
The first query does work. But the stored procedure calling does not. Any help? Any Idea?
I thank your help beforehand.
edalorzo@hotmail.com