Subject | RE: [IBO] TIB_Query/TIB_Cursor GeneratorLinks not working |
---|---|
Author | Jason Wharton |
Post date | 2018-06-28T18:46:10Z |
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
Sent: Thursday, June 28, 2018 1:16 AM
To: IBObjects@yahoogroups.com
Subject: [IBO] TIB_Query/TIB_Cursor GeneratorLinks not working
Version 5.9.7 2754
Delphi 7
When doing an insert with a TIB_Query or TIB_Cursor which has
GeneratorLinks set the value is returning ZERO.
This worked in version 5.9.5 2652 and before.
Example code below.
Michael Horne
procedure TformNetComWebMessages.Button3Click(Sender: TObject);
var nc_id:integer;
begin
nc_id := 0;
curNetComOut.Insert;
nc_id := curNetComOut.FieldByName('NC_ID').AsInteger;
ShowMessage(IntToStr(nc_id));
curNetComOut.cancel;
end;
object curNetComOut: TIB_Cursor
IB_Connection = formIBData.cnMain
SQL.Strings = ('select * from netcomout')
GeneratorLinks.Strings = ('NC_ID=gen_NetComOut_ID')
KeyLinks.Strings = ('NC_ID')
PessimisticLocking = True
Left = 512
Top = 96
end
object qyNetComOut: TIB_Query
IB_Connection = formIBData.cnMain
SQL.Strings = (
'SELECT NC_ID, NC_TYPE, NC_NAME'
'from NetComOut'
'order by nc_Type')
GeneratorLinks.Strings = (
'NC_ID=gen_NetComOut_ID')
RequestLive = True
Left = 560
Top = 40
end