Delphi Web Services and Oracle Stored Procedure



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.

.



Relevant Pages

  • Re: Error in calling stored procedure via DB link
    ... "Paul Clement" wrote: ... Below is an Oracle KB article that documents the issue. ... Calling Stored Procedure over Dblink Using Oracle OleDb Provider Fails ... > symptom: Using command type adCmdStoredProc ...
    (microsoft.public.vb.database.ado)
  • Re: Performance problems with StoredProcedure in Web application
    ... you could probably just ignore my comments about stored procedure performance as compared to textual queries because they ... As for your question about how to avoid using a cursor (as I suggested was possible in Oracle) read the following paragraph for more ... The .NET Framework Data Provider for Oracle does not support batched SQL statements. ... CURSOR output parameters to fill a DataSet, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Passing Back Table Information from Oracle .NET Stored Procedures
    ... stored procedure, not in the typical PL/SQL sense. ... I don't care if it's MS SQL in-line code or Oracle in-line code, MS SQL Server, Oracle Proc, or this so called .NET Stored Procedure using a Select statement, they are all returning a RESULT SET whether it be one row or multiple rows. ... I used SqlContext above because I don't want to bother registering at the Oracle site to download their Oracle Database Extensions for .NET in order to get at the presumably extant OracleContext class. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: EXEC syntax for SP which returns row set
    ... >>> Oracle experts, none of whom seem to know. ... >> SQL> create or replace package returncur is ... > I don't know why you are supplying the above example. ... to illustrate HOW you'd call a stored procedure and return ...
    (comp.databases.oracle.server)
  • Re: inserting XML Document into Oracle database using a stored procedure
    ... What i am trying to do is i want to insert a xml file into the Oracle database using a stored procedure which takes a XmlType type parameter. ...
    (perl.dbi.users)