Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with AutoIncrement.

Status
Not open for further replies.

delphiman

Programmer
Dec 13, 2001
422
ZA

I am using Delphi 6 and Interbase 6 and have the following
in the script of a DataBase

create trigger CID_NOinsert for CHILD
before insert
position 0
as
begin
NEW.CID_NO = gen_id(cld_number_gen,1);
end!!

Upon scrolling onto a new record in a grid (and despite the above) no value is evident in CID_NO.

However if I enter a number (anything!) into CID_NO AND move off the record (thus Posting) the number which I have entered is corrected to what it should be according to the above trigger. And becomes visible upon scrolling back to the record.

The frustrating thing is the absolute need to have to enter a No into CID_NO manually.

Can anyone please suggest how to get around this?

Thanks in advance.

Terry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top