Here is a code segment that I am using to produce a claim number for a child table. It does a lookup in a table to see if any claims have already been entered for the current account. If so, it increments the last used claim number and returns the new claim number. If a claim has not been entered for the current account, it will add a record to the claimnumbers table and set the claim number to 1 for the current account.
This routine works fine with local data. However, when running with shared data on a file server, the append blank is not appending. Can anybody tell me why?
nArea = select()
select claimnumbers
if seek(account.a_id, 'CLAIMNUMBERS', 'PRIMARY')
if DJ_RecLock()
nClaimNo = claimno + 1
replace claimno with nClaimNo
unlock
else
nClaimNo = -1
endif
else
append blank
nClaimNo = 1
replace a_id with account.a_id, claimno with nClaimNo
endif
select (nArea)
return nClaimNo
Thanks
Dan Jurden
dan_jurden@ciccorp.com