Subject RE: [IBO] TIB_Query/TIB_Cursor GeneratorLinks not working
Author Jason Wharton
Hi Michael,
 
This has already been fixed in my development sources.
It is due to the use of a DEFAULT clause with the column or domain.
 
I hope to get out a new release by tomorrow that addresses this, among other fixes.
 
Thanks,
Jason Wharton
 


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