works with TOAD, works with sql*plus, but NOT FROM APPLICATION!!!!!
Hello guys,
Hope everything goes fine. I need some help with this issue.
I call an stored procedure from TOAD, it works fine. I call the same stored from SQL*Plus, it also works fine, but when i call this stored from an application, using ADO, it brings me and ORA-00900 invalid SQL statement.
This stored procedure only makes and small QUERY on a view somewhere else, like this :
CREATE OR REPLACE PROCEDURE Sp_Int_BuscaDatosArbolFPro
(sTipoDoc in VARCHAR2, sNroDoc in VARCHAR2, out_cursor out pk_cursor.CURSOR_TYPE)
AS
BEGIN
open out_cursor for
select *
from leer_por_rut_asegurado
where tipo_documento = sTipoDoc
and rut_asegurado = sNroDoc;
END;
leer_por_rut_asegurado is a view. I execute this stored from TOAD and it works fine, also from SQL*Plus with no problem, the problem arises when i call this stored procedure from and app via ADO. I cannot see what goes wrong. Anyway i tried this if it might help :
select * from leer_por_rut_asegurado where tipo_documento = ' 1' and rut_asegurado = '4456789';
shows no error messages but no data. If i do this :
select * from leer_por_rut_asegurado where tipo_documento = 1 and rut_asegurado = 4456789;
shows no error messages with 1 row returned. Is it possible that this could be the cause? the columns datatypes?
thanks in advance to everyone.
Regards,
DGC
How are you calling the procedure?
How is the procedure being called from the app? Can you show us the code? It might be an error in how the procedure is being called, like using the execute Sqlplus command.