howellk
Programmer
- Jun 5, 2014
- 2
I use a button on a browse to duplicate a record, and before saving the "cloned" record, I rename the unique id.
This works on a table with one unique key, for example:
file_id - primary key, unique, alpha-numeric
However, attempting to duplicate a record on a table with two unique keys, see below, will result in an auto incremental error, which make sense:
file_id - primary key, unique, alpha-numeric
serial_no - unique, auto number
I assume the error being posted relates to the "secondary' key, and what needs to be done is to manually prime the "secondary' key by first getting the previous record in sequence?
Any advice/help appreciated.
This works on a table with one unique key, for example:
file_id - primary key, unique, alpha-numeric
However, attempting to duplicate a record on a table with two unique keys, see below, will result in an auto incremental error, which make sense:
file_id - primary key, unique, alpha-numeric
serial_no - unique, auto number
I assume the error being posted relates to the "secondary' key, and what needs to be done is to manually prime the "secondary' key by first getting the previous record in sequence?
Any advice/help appreciated.