Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't do a simple REPLACE command
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00305973
Message ID:
00305999
Vues:
31
David,

Thanks, that was definitely the problem.

>Elgin,
>
>STR() without the second parameter is going to return a 10 character long string which is probably bigger than your field from the symptoms.
>
>>I am using the following piece of code:
>>
>>************************
>>SELECT 1
>> GO TOP
>> DO WHILE .NOT. EOF()
>> cDupeId=EVALUATE(SYS(14,1)) && Get the Value of index tag number 1
>> SKIP
>> IF cDupeId=EVALUATE(SYS(14,1))
>> REPLACE samplenum WITH STR(VAL(samplenum)+1)
>> *BROWSE
>> ENDIF
>> ENDDO
>>*************************
>>
>>The "samplenum" field is character type. However, when a duplicate on the index is found, it just blanks out the field. It doesn't replace it with the incremented value as I want it to.
>>
>>For the most part the index tag #1 is made of up of a date+tank+apparatus+samplenum. And the data always starts with the samplenum equal to 1 in every case. When the complete index tag number 1 evaluates to a duplicate, I want it to increment the samplenum by one so it will no longer be a duplicate.
>>
>>Thanks
>>Elgin Rogers Jr
Elgin Rogers
Epic Solutions
www.epicsolutions.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform