Delphi Web Services and Oracle Stored Procedure
- From: Natalia M <natalia.mazzullo@xxxxxxxxx>
- Date: Tue, 09 Oct 2007 16:20:36 -0000
Hello, I'm trying to develop an Stored Procedure Web Service, using
Delphi 2006 and Oracle 10g.
I created a Stored Procedure in Oracle which receives input
parameters and outputs a dynamic PLSQL cursor, like this:
//-----------------------------------------------------------------------------------------
CREATE PACKAGE pkg_web_intranet_usuarios
IS
/* Define the REF CURSOR type. */
TYPE web_intranet_usuarios_type IS REF CURSOR RETURN
web_intranet_usuarios%ROWTYPE;
END pkg_web_intranet_usuarios;
//-----------------------------------------------------------------------------------------
CREATE PROCEDURE pr_web_intranet_usuarios
(i_usuario IN varchar2,i_clave IN varchar2,i_habilitado IN varchar2,
resultado out pkg_web_intranet_usuarios.web_intranet_usuarios_type)
AS
BEGIN
OPEN resultado FOR
SELECT *
FROM web_intranet_usuarios
WHERE usuario=i_usuario and clave=i_clave and
habilitado=i_habilitado;
END pr_web_intranet_usuarios;
//-----------------------------------------------------------------------------------------
Then in Delphi I execute the store procedure:
ADOStoredProc1.Connection:= ADOConnection1;
ADOStoredProc1.ProcedureName := 'pr_web_intranet_usuarios';
ADOStoredProc1.Parameters.Clear;
ADOStoredProc1.Parameters.CreateParameter('@i_usuario',ftstring,pdinput,
50,usuario);
ADOStoredProc1.Parameters.CreateParameter('@i_clave',ftstring,pdinput,
50,clave);
ADOStoredProc1.Parameters.CreateParameter('@i_habilitado',ftstring,pdinput,
1,habilitado);
ADOStoredProc1.Active:= true;
ADOStoredProc1.Prepared:= true;
ADOStoredProc1.open;
This works fine, but the problem is that I want the resultant
recordset to be the result of a WebService function, and
TADOStoredProc, TADOQuery, TADODataSet, TDataSource .. etc .. are not
serializables.
How can I return this results in my WebService?
Is there another component or another way to do this that can solve my
problem?
Thanks in advance for any help.
.
- Prev by Date: Re: Assign username/password to access file
- Next by Date: Free Interbase & Firebird OLE DB - iboledb 2.0.0207 (released Nov 18, 2006)
- Previous by thread: TADOStoredProc
- Next by thread: Free Interbase & Firebird OLE DB - iboledb 2.0.0207 (released Nov 18, 2006)
- Index(es):
Relevant Pages
|