Hi Lance,
In a message of , Lance Leonard (1:216/506) writes:
HP>> So when they create a new element in this table, I put
HP>> in the first field (Code field) a Number, wich could be
HP>> for e.g. the Firm Key, the value of this number is
HP>> going up for eatch new one. (This field is Indexed)
LL>
LL> You posted this question a couple of weeks ago, didn't you? (I
LL> think I recall responding to the earlier post, but something may have
LL> happened to the message base on your or my local BBS. If you can
LL> review older messages, you might look for other responses.)
Never get it ...
LL> AAR, what you're looking for is called an "auto-incrementing" field.
LL> If you were using Paradox 5.0, this would be a snap, because that
LL> version added this as a built-in field type and the work of
LL> calculating the new number is handled automatically. Since you're
LL> working in 4.5, you'll need to perform a little work.
LL> I think there's a simple example of this in the "Guide to ObjectPAL"
LL> (check out the index for "auto-increment." (It may be a tutorial
LL> example.)
LL> The basic technique is to trap for dataUnlockRecord and
LL> dataPostRecord on a Record object's action method and then to try to
LL> post the record. If the post failes and returns an
Never get it with UnlockRecord ... :-?
LL> eventInfo.errorCode of peKeyViol, then add 1 to the value in the key
LL> field.
LL> If you can access Borland's TechFAX system, there are a couple of
What is the phone number ??? ... and some file name if possible cause French
/ USA link is expensive ... ;)
LL> TI's containing code samples and more specific instructions. It's a
LL> toll-free call in North America. If you're in a different region,
LL> you might contact the local Borland office's support system for the
LL> specific TI's.
Regards,
Herv‚ - Herve@thebbs.freenix.fr
--- JetMail 0.99beta10
---------------
* Origin: --==> THE BBS for ATARI <==-- Paris, France (FidoNet 2:320/107)
|