Subject Re: [firebird-support] .NET and Firebird...
Author Helen Borrie
At 10:47 AM 7/12/2004 +0000, you wrote:


>I'm trying to extract data using ADO.NET and FB 1.5.1.
>
>I have a stored procedure that does a "for/do" loop to select records.
> The sproc works fine on its own but I'm having a problem
>understanding how it would be called.
>
>In SQL Server I would simply load the sproc up by calling it and
>loading it into a DataTable or DataReader, for example.

There's your problem. Firebird SP's don't work in that klutzy
way. Assuming you have defined the SP with FOR SELECT....INTO <OUTPUT
VARS> DO...SUSPEND - a selectable stored procedure - then you invoke this
SP with a SELECT statement and use whatever client object you would use for
any multi-row set.

Let's say you have a SP created like

create procedure myproc (input1 integer, input2 varchar(10)
returns (
blah...,
....
...
)
as
begin
....

then your SQL statement will be like
SELECT BLAH, .......
FROM MYPROC(99, 'Cabbages')
or, if using replaceable parameters:

SELECT BLAH, .......
FROM MYPROC(?, ?)

Use the Firebird ADO .NET provider, though, and ask on the
firebird-net-provider list about any difficulties, etc.

./heLen