Subject | Re: [IBO] DSQL doesn´t, CURSOR does twice: stored procedures |
---|---|
Author | hannes hernler |
Post date | 2001-10-21T13:59:37Z |
did anybody get this problem too?
I posted it some days ago, tried again and again,
but it is always the same.
I posted it some days ago, tried again and again,
but it is always the same.
----- Original Message -----
From: "hannes hernler" <ibo.hernler@...>
Sent: Wednesday, October 17, 2001 7:07 PM
> I´ve got a funny phenomenon:
>
> I have a stored procedure in my database and tested
> various IBO components by calling this SP.
> ------------
> if not dsqlNewItem.Prepared then
> dsqlNewItem.Prepare;
> dsqlNewItem.ParamByName('POMAGID').asinteger := Info['OMag'];
> dsqlNewItem.ParamByName('PIPARENT').asinteger := Info['Parent'];
> dsqlNewItem.Execute;
> result:= dsqlNewItem.fieldbyname('RID').asinteger;
> -------------
> the DSQL query is always the same:
>
> SELECT RID FROM SP_OMITEM_NEW( ?POMAGID, ?PIPARENT )
> ------------
> in the SP a generator is called and an row inserted in a table.
> the generated value is returned.
>
> when I use a TIB_Cursor, the procedure is called twice.
> when I use TIB_DSQL it works one time in the context above
> and from then on reurns the same RID every time (and no
> row is inserted)
> when I use TIB_StoredProcedure everything works fine.
>
> ok, I go and use TIB_StoredProcedure .
> but in IBO help is written that it should make no difference...
hannes hernler
--------------------------------------------------------
DWS - Delphi Web Script
developing professional web apps
look at http://www.dwscript.com
--------------------------------------------------------