Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Go bottom
Message
 
 
To
15/10/2004 05:00:59
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00950231
Message ID:
00951720
Views:
5
Mohammed,

Are you trying to use this code to generate the next primary key value? If so it won't work in a multiuser system, or if a single user can open your form more than once. You should look at using an autoincrement field, or use a function that uses a key table to generate unique key values. I'm pretty sure there is a version of this function in the VFP sample app. There is probably one or two versions in the files section here too.


>if i start now to insert my first bill
>i want to get billno=1 at my THISFORM.TEXT1.VALUE ,
>.
>i try to change as
>1.IF _TALLY >= 0
>2.IF _TALLY > 0 or _TALLY =0
>i get error message (laArray is not found),
>
>
>
>this code works exellent but if i have at least one bill at my table
>SELECT MAX(BILLNO) FROM mstr INTO ARRAY laArray
>IF _TALLY > 0
>  THISFORM.TEXT1.VALUE = laArray + 1
>ENDIF
>
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform