Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do While
Message
De
06/04/2002 15:47:03
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Do While
Divers
Thread ID:
00641845
Message ID:
00641845
Vues:
48
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform