Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Candidate Key - check before the table gets it
Message
From
12/03/2001 15:16:53
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Candidate Key - check before the table gets it
Miscellaneous
Thread ID:
00484212
Message ID:
00484212
Views:
62
SET DELETED OFF
SET ORDER TO main
SEEK(m.id)
IF FOUND()
Messagebox('Sorry, can not use that ID'+CHR(13)+'This ID has not been purged from the database.',64)
SET DELETED ON
SET ORDER TO main
RETURN .F.
ENDIF
SET DELETED ON
SET ORDER TO main

Does this code (in the form) looks about right for me to catch the dupe ID before the table gets the error? I am not sure if I am using the SET ORDER TO correctly (and if it does "reindex" it as well?)? The table already have SET ORDER TO MAIN from the main.prg, so would those codes mean anything in the form?

Chuck
Today is tomorrow's yesterday.
Next
Reply
Map
View

Click here to load this message in the networking platform