-------- Original Message --------
Subject: Assigning Invoice Numbers
Date: Tue, 25 Jun 2013 12:32:59 -0500
From: Les Stark <[email protected]>
To: [email protected]
I am having a problem with duplicate invoice numbers.
I have a table INVNUM with a column INVNBR that holds an integer
value for the invoice number.
When I create a new invoice, SET VAR VINV#=INVNBR IN INVNUM to
get the last invoice number from the table
then I increment that number SET VAR VINV#=(.VINVNBR +
1) the incremented number is used for the current invoice
then I update the table UPDATE INVNUM SET INVNBR=.VINV#
The table is ready for the next new invoice and the current invoice
is written with the value of VINV#
This is a multiple user database and is using Row Locks, Column Verify
on the tables
How am I getting duplicate invoice numbers?
Is there a better way to assign Invoice Numbers?
--