Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do try again if an insert fails?
Message
From
01/04/2003 11:06:05
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
How do try again if an insert fails?
Miscellaneous
Thread ID:
00772428
Message ID:
00772428
Views:
35
I have a bit of code that inserts a record into a table. The problem is that there is an external program, that i did not write, that requires exclusive use of that table. occasionally there is an error, when they bump heads.

I would like to add some sort of trap that would test to see if the table is available at that moment, if it's not then try again several times before erroring out or succeeding.

********************************
Insert into 'i:\data\ecnc\data\bcexclusive.dbf' (fnction, forg_date, ;
forg_time, fdate, ftime, fempno,;
fjobno, foperno, fcompqty, fscrpqty, flead, fsetup, frework);
values (cFunction, cdate, cOrg_Time,;
cdate, cTime, cEmpNo,;
cJobNo, cOpNo, nCompleted, 0, 'Y', cSetup, 'N')
use in bcexclusive &&Close table. bcposting needs exclusive use
*********************************

Oh, by the way, how do i highlight my code above, for the post here on UT?
Next
Reply
Map
View

Click here to load this message in the networking platform