Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using the Primary Key
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00384624
Message ID:
00384651
Views:
25
That should read "...two users are NOT using the form at the same time..."


>As long as two users are using the form at the same time and both try to add the same user i.d.. The second person to add the user i.d. will have a problem with the primary key.
>
>Joe
>
>>I gather that this is a "add user" form?
>>if so in the init of the form or the gotfocus of the textbox I would do
>>
>>Select DISTINCT user_id ;
>>from blabla ;
>>into array a_user_id
>>
>>then in the lostfocus or valid of the textbox I would do
>>
>>ln_ret = ASCAN(a_user_id, this.value)
>>if ln_ret <> 0
>>return .t.
>>else
>>messagebox('error',0,'error')
>>return .f.
>>endif
>>
>>I think you get the jist of it
>>
>>Stephen McLaughlin
>>"Blastmaster"
>>stephenmclaughlin@email.com
Joseph C. Kempel
Systems Analyst/Programmer
JNC
Previous
Reply
Map
View

Click here to load this message in the networking platform