Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do While
Message
From
06/04/2002 15:47:03
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Do While
Miscellaneous
Thread ID:
00641845
Message ID:
00641845
Views:
46
Hi All:

I added a new field to my table and would like to store a numeric key for each record in the table. This key is generated as shown in the code below.
go bottom
mNumberOfRecords = recno()
do while mLineCount <= mNumberOfRecords
        mTestID = val(alltrim((dtos(date()))+alltrim(str(1000*seconds()))))+mTestID
	update labtests set labtests.testid = mTestID
	mTestID = mTestID+1
	mLineCount = mLineCount + 1
enddo
Problem: This code inserts the numbers, but they are all the same fo all the records. I would like for it to generate a unique number for each record.

TIA.
- Ravi

True greatness consists in being great in little things.
- Charles Simmons
Next
Reply
Map
View

Click here to load this message in the networking platform