Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to know if I changed the field
Message
From
12/02/2004 17:27:58
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
How to know if I changed the field
Miscellaneous
Thread ID:
00876888
Message ID:
00876888
Views:
53
We are sharing information between our app and another app both importing and exporting from SQL. When we are done importing they want to export the information. So we decided to have a field in a one record SQL table to determine when we could import/export. So if they field is 'N' that means they are done with the export. If the field is 'Y' then we are done with the import. If the field is 'X' then one of us is process of doing an update. So for the import the field would go from an (N->X->Y) then they would set the field back to (Y->X->N).

So I initally thinking that I could issue the following statement and check to see if schedstat is 'X' to see if I could import.
UPDATE SCHEDULE SET SCHEDSTAT = 'X' WHERE SCHEDSTAT = 'N'
The problem is that what if it's already an 'X'. How can I tell if I changed the value or not? If I check first then try the update - there is a small chance that they could have updated it to an 'X' first.

We are using VFP6 with SPT
Charles

"The code knows no master." - Chuck Mautz
"Everybody is ignorant, only on different subjects." - Will Rogers
Next
Reply
Map
View

Click here to load this message in the networking platform