General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
How do try again if an insert fails?
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only