[Lazarus] Focus on modal form with ShowMessage

Bogusław Brandys brandys at o2.pl
Tue May 27 12:45:12 CEST 2008


Dave Coventry wrote:
> Damien,
> 
> Thanks for the reply.
> 
> The situation is getting pretty urgent.
> 
> What I'm doing is this:
> The user enters in preliminary information which creates a sequential
> partial record in the database using nextval(''reg_seq'').
> 
> Further information is added to the record later.
> 
> What I need is to populate my form with the fields from the database.
> 
> I need to access the number of the record assigned by
> nextval(''reg_seq''), and then I need to get the fields from the
> record to place in edit boxes so that the user can update them....

Fetch the sequence first in a before post event in your app (in case you 
have a new record). Set the ID yourself. If you used a sequence as 
datatype in the DB, it won't generate a new one when an ID is passed.

Marc




More information about the Lazarus mailing list