Subject | RE: [IBO] Stored proc question |
---|---|
Author | Nico Callewaert |
Post date | 2001-05-29T13:43:59Z |
Ok Helen, Thanks again,
Nico
-----Oorspronkelijk bericht-----
Van: Helen Borrie [mailto:helebor@...]
Verzonden: dinsdag 29 mei 2001 15:30
Aan: IBObjects@yahoogroups.com
Onderwerp: RE: [IBO] Stored proc question
At 03:05 PM 29-05-01 +0200, you wrote:
to unprepare) by adding a SUSPEND to your stored procedure and using a
SELECT from the SP to both execute it and get the return value.
However, you should also be able to bring the return parameter into a
variable if you keep it in a stored procedure component. The trick, if I
recall correctly, is that, because it is an output column, you need to read
it from the Fields (not Params) array after execution, using
FieldByName('MyOutputCol').AsWhatever.
Helen
InterBase Developer Initiative · http://www.interbase2000.org
_______________________________________________________
Yahoo! Groups Sponsor
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
Nico
-----Oorspronkelijk bericht-----
Van: Helen Borrie [mailto:helebor@...]
Verzonden: dinsdag 29 mei 2001 15:30
Aan: IBObjects@yahoogroups.com
Onderwerp: RE: [IBO] Stored proc question
At 03:05 PM 29-05-01 +0200, you wrote:
>Helen,ExecProc
>
> One more thing, it's a procedure that is returning a value, is
>the preferred way to get the value ? Should I get that value through aWell, you >can< do it (and, I think, solve the bug, too, i.e. avoid having
>IB_Cursor ? It's just a one-record select I'm doing.
to unprepare) by adding a SUSPEND to your stored procedure and using a
SELECT from the SP to both execute it and get the return value.
However, you should also be able to bring the return parameter into a
variable if you keep it in a stored procedure component. The trick, if I
recall correctly, is that, because it is an output column, you need to read
it from the Fields (not Params) array after execution, using
FieldByName('MyOutputCol').AsWhatever.
Helen
>Thanks,When
>
>Nico
> -----Oorspronkelijk bericht-----
> Van: Helen Borrie [mailto:helebor@...]
> Verzonden: dinsdag 29 mei 2001 14:51
> Aan: IBObjects@yahoogroups.com
> Onderwerp: Re: [IBO] Stored proc question
>
>
> At 02:48 PM 29-05-01 +0200, you wrote:
> >Hi all,
> >
> > I have a stored procedure that is executed a few times.
>it'sagain ?
> >executed the second time I'm having a Invalid DSQLA structure or
>something
> >like that (forgotten to write it down immediatly).
> >My program looks like this :
> >
> > if not Prepared then
> > Prepare;
> > Params [0].AsString := Trim (IB_Edit1.Text);
> > ExecProc;
> >
> >Do I have to do a close and a Unprepare every time it's executed
>of a
> Yes, unfortunately, with executable stored procedures you do, because
>bug in the API function, that fails to clear a field in that structureafter
>execution.All for Open and Open for All
>
> Regards,
> Helen
>
> All for Open and Open for All
> InterBase Developer Initiative · http://www.interbase2000.org
> _______________________________________________________
>
> Yahoo! Groups Sponsor
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
>
>[Non-text portions of this message have been removed]
>
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
InterBase Developer Initiative · http://www.interbase2000.org
_______________________________________________________
Yahoo! Groups Sponsor
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]