Board index » delphi » TIBStoredProc And Generators

TIBStoredProc And Generators

Hello,

I am using a TIBStoredProc component to insert a record into a table. This
works perfectly, however, I need to know the value assigned to my primary
key field by my Generator after I use ExecProc. How do I go about doing
this?

Thank you,

Tracy McClarnon

 

Re:TIBStoredProc And Generators


Quote
Tracy McClarnon wrote:
> Hello,

> I am using a TIBStoredProc component to insert a record into a table. This
> works perfectly, however, I need to know the value assigned to my primary
> key field by my Generator after I use ExecProc. How do I go about doing
> this?

> Thank you,

> Tracy McClarnon

If you assign the value of the PK in the StoredProc, you can out it on a
output parameter, then you can read the value after ExecProv in this
way: StoredProc1.Parambyname('OutputVariable').Value

Re:TIBStoredProc And Generators


Call GEN_ID to get the value ans assign it to an output parameter.
Then use the value in the INSERT.

--
Bill (TeamB)
(TeamB cannot respond to questions received via email)

Other Threads