Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Number at mytext
Message
From
05/12/2004 17:42:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
05/12/2004 17:24:01
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00966918
Message ID:
00967024
Views:
25
When you call the function, SerialNumber(), you have to pass a parameter, which sequence you want to use.

For example:
replace MyField with SerialNumber("Client")
would generate a sequence called "Client". This will add a row to the table SerialNumber.

>hi,
>i try as under , i get tnSequence not found,value not found, and data type mismatch
>
>INDEX ON sequence TAG sequence
>set order to "sequence"
>
>seek padr(tnSequence, len(sequence))
>if not found()
>	append blank
>	*replace sequence with tnSequence, nextnum with 1
>       replace thisform.text1.value with tnSequence, nextnum with 1
>
>
>thanks
>
>
>>>i create table(serialnumber with 2 field sequnce char(16) and DocNumber char(16)). i run myform,via my new method via your code,
>>
>>The way the code is designed, for the sequences, you need a table called SerialNumber.dbf.
>>
>>This table has to have a field called Sequence, and an index on that field. BTW, I don't know why the command SET ORDER... is commented; I think it has to be included.
>>
>>The sequence table also needs a field called NextNum, which will store the next number that will be assigned.
>>
>>The field DocNumber was just an example, of a field where you want to store a sequential number. This would be in another table. Just create a test table for this purpose.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform