Subject | TIBOTable and TIBOQuery problem |
---|---|
Author | Hans |
Post date | 2005-01-30T01:14:53Z |
Hello Jason,
TIBOTable and TIBOQuery problem.
AppendRecord doesn't honor or insert according to specified GeneratorLinks
Table 'IHist' has only one primary key
with frmCompanyDatabase.IHist do
begin
SessionName := 'mySession';
DatabaseName := 'myDatabase';
TableName := 'IHist';
GeneratorLinks.Clear;
GeneratorLinks.Add('IHistID=IHist_IHistID');
open;
append;
post;
append;
post;
append;
post;
/* Three records get appended correctly with auto generator link values for field 'IHistID' */
AppendRecord([nil, 1, 1, LastMonthYear, LastMonth, 1, EncodeDate(LastMonthYear, LastMonth, 1), 500, Null, 'Physical Count', Null, 1, Null]);
/* However the AppendRecord raises exception
violation of PRIMARY or UNIQUE KEY constraint "INTEG_88" on table "IHIST" */
end;
Best Regards
Hans
[Non-text portions of this message have been removed]
TIBOTable and TIBOQuery problem.
AppendRecord doesn't honor or insert according to specified GeneratorLinks
Table 'IHist' has only one primary key
with frmCompanyDatabase.IHist do
begin
SessionName := 'mySession';
DatabaseName := 'myDatabase';
TableName := 'IHist';
GeneratorLinks.Clear;
GeneratorLinks.Add('IHistID=IHist_IHistID');
open;
append;
post;
append;
post;
append;
post;
/* Three records get appended correctly with auto generator link values for field 'IHistID' */
AppendRecord([nil, 1, 1, LastMonthYear, LastMonth, 1, EncodeDate(LastMonthYear, LastMonth, 1), 500, Null, 'Physical Count', Null, 1, Null]);
/* However the AppendRecord raises exception
violation of PRIMARY or UNIQUE KEY constraint "INTEG_88" on table "IHIST" */
end;
Best Regards
Hans
[Non-text portions of this message have been removed]