TZF - Auto Increment

"joseph.edwards" <[email protected]>
Newsgroups gmane.comp.lang.delphi.topaz
Message-ID <[email protected]>
HI everyone.

Having struggled for another three hours to try and get an auto-increment on
a field working,  can anyone help me perhaps with some demo code?

I can get it to work using the OnNewRecord and AfterInsert events,  but I
cannot deal with the situationn where the user cancels after choosing an
append.

In dBASE,  I have control over exactly when I append the record and by using
a matching set of memory variables I can update the autoincrement counter
only when I actually append a new record.

However if I use tzNavigator,  and get the new incremented field value with
the OnNewRecord event ,  when do I update this valuefor the next time?  If
you use AfterInsert this does not work as this triggers before the record is
cancelled.  I cannot use after Post as this would fire when any record not
just a new one was posted.  Similarly AfterCancel is no help either.
Perhaps I have to keep a system flag to tell me when I am inserting a new
record but this is getting very kludgy?

Does anyone have any good ideas.

Thanks in advance

Joe

==^================================================================
This email was sent to: [email protected]

EASY UNSUBSCRIBE click here: http://topica.com/u/?clvXPN.a5kvff.Z2NsZHQt
Or send an email to: [email protected]

TOPICA - Start your own email discussion group. FREE!
http://www.topica.com/partner/tag02/create/index2.html
==^================================================================
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.