faq u white devles!
Consulting in Model-Based Development, Transformation, and Object-Oriented Best Practice http://www.cintegrity.com
Use a sequence in the following manner:
INSERT INTO pub.customer VALUES (
’Sugar Hill Road’,
The functionality you want is a function of the database, not the language used to access it. I associate this kind of autogenerated sequential id with toy databases like Access. I've never missed it in millions of lines of ABL.
The problem with putting stuff like this in the database or triggers is that one then has the logic in two or more places. Put it all into the application in a data access layer and you can go one place to see relationships, constraints, sources, etc.
My point is that when you look at the data access code, you can't see the autonumber. It just happens. I'd rather have it all in one place.
Come to PUG Challenge Americas and I will be presenting on a data access layer for ABL.
My point is that nowhere there do you see ID being assigned a value. Only from a comment or looking in the dictionary are you going to know how it gets a value and what kind of value it is.