wpb
|
| Posted: 07/09/2002, 10:05 AM |
|
I would like to verify the value of the primary key, before a new record is inserted into the database. In the before insert event, I have:
fldROUTE_ORDER = dLookUp("OID_MASTER", "max(ROUTE_ORDER)+1", "ROUTE_ORDER <> NULL");
In the database, the any value of ROUTE_ORDER is an integer. I can successfully insert timestamps and text data, but not integers.
I have tried converting the result to a string and to an int, but nothing seems to work. What have I stupidly overlooked?
|
|
|
 |
Nicole
|
| Posted: 07/10/2002, 1:23 AM |
|
Hello,
CC expects primary keys to be autonumbers, so the primary key isn't included into insert sql query. In case you want to assign primary key value to the field by yourself, you should create Custom Action event for the form, edit query to include primary_key and its value to it.
|
|
|
 |
|