Subject Re: [firebird-support] stored procedures - Part 1 SELECT
Author Luis Ruiz
Gracias!
I use this stored procedures ( pa_Entidad_Listar,
pa_Entidad_ListarCombo,pa_Entidad_ListarRegistro,pa_Entidad_ListarValor)
and others like (pa_Entidad_Add,pa_Entidad_Delete,
pa_Entidad_Update)to generalize the database
interaction of the business objects of my aplications,
for scability, flexibility by inheritence. In this way
only need to call the method:
businesfacadeobject.Listar("Pedido")
--> then ...
Public DataSet Listar(String nombreEntidad)
{
command.excutenonquerry("pa_"+nombreEntidad
+"_Listar")
}


I cant call its in this way?
EXECUTE PROCEDURE pa_Pais_Consultar
and
EXECUTE PROCEDURE pa_Pais_Consultar (3)
if not a cant use its.



--- Helen Borrie <helebor@...> wrote:
> At 02:15 PM 22/09/2003 -0700, you wrote:
>
> >Ok, my SPs dont handle Tranasactions, just SELECTs,
> INSERTs, DELETEs,
> >UPDATEs.
> >
> >I woul like you help me with these SELECT Stored
> Procedures, are simple
> >but I can`t retieve the results to my aplication.
> >
> >I wan to retrive the rows of these selects, not by
> return parameters, that
> >are I retrieve in this moment.
>
> Firebird has "selectable stored procedures" for
> returning multiple-row
> sets. But you still have to define the output in a
> "returns" clause.
>
>
> >sqlserver:
> >
>
>-----------------------------------------------------------------------
> >
> >CREATE PROCEDURE pa_Pais_Consultar
> >AS
> > SELECT * FROM Paises
> >
> >GO
>
> CREATE PROCEDURE pa_Pais_Consultar
> returns (output1, output2....whole column list)
> as
> begin
> for select col1, col2...whole column list
> from Paises
> into :output1, :output2......etc. DO
> SUSPEND;
> end
>
>
>
>-----------------------------------------------------------------------
> >
> >And this one (sqlserver):
> >
>
>-----------------------------------------------------------------------
> >
> >CREATE PROCEDURE pa_Pais_Consultar
> > @Id INTEGER
> >AS
> > SELECT * FROM Paises WHERE [Id] = @Id
> >GO
> >
>
>------------------------------------------------------------------------
>
> CREATE PROCEDURE pa_Pais_Consultar3
> (Id INTEGER)
> returns (output1, output2....whole column list)
> as
> begin
> for select col1, col2...whole column list
> from Paises
> where Id = :Id
> into :output1, :output2......etc. DO
> SUSPEND;
> end
>
> >I Call thes SPs in this way:
> >
> >EXEC pa_Pais_Consultar
> >
> >And
> >
> >EXEC pa_Pais_Consultar 3
>
> Firebird calls them like this:
>
> select * from pa_Pais_Consultar
> and
> select * from pa_Pais_Consultar3 (constant_value)
>
> I'm curious why you need SPs to get these sets.
>
> There is a documentation about writing SPs. Get the
> IB 6 beta doc Language
> Reference (langref.pdf) from the www.ibphoenix.com
> site, at Downloads >
> InterBase.
>
> heLen
>
>
>


=====
--------------------------------------------------------------------

"La realidad no es m�s que impulsos el�ctricos generados por el cerero" Morpheus-Matrix
"...El orco se detuvo, despavorido. Porque lo que vio no fue un hobbit peque�o y asustado tratando de sostener con mano firme una espada:
vio una gran forma silenciosa, embozada en una sombra gris, que se ergu�a ante �l a la tr�mula luz de las antorchas; en una mano esgrim�a una espada, cuya sola luz era un dolor lacerante; la otra la ten�a apretada contra el pecho, escondiendo alguna amenaza innominada de poder y destrucci�n..."






__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com