General information
Category:
Forms & Form designer
Thanks for your reply, now I know where to put the code.
I noticed in your code snippet, you are setting the key the hard way. I use a stored procedure as the default value for my primary keys
function new_key
parameters tbl_name, key_field
private newkey
select max(&key_field) from &tbl_name into array temp
if _tally >0 && found records
newkey = temp(1)+1
else && empty table
newkey = 1
endif
return newkey
then in the key field's default value I put new_key("sometbl","keyfield")
and I never worry about unique keys
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only