but, if the primary key is recNo and the create methods returns this number for a new records (my solution appends the record to end of database file), how to possible generate this exception ???
In fact the create method shouldn't throw the DuplicateKeyException because the key is the record number. If you don't reuse record number why need to bother. If you do reuse record number, how could you check that name/location etc is the same. Therefore you may ignore this exception. Do document your decision in the choices.txt file.
K. Tsang wrote:In fact the create method shouldn't throw the DuplicateKeyException because the key is the record number. If you don't reuse record number why need to bother. If you do reuse record number, how could you check that name/location etc is the same. Therefore you may ignore this exception. Do document your decision in the choices.txt file.
Thanks Tsang
Laura
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.