Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I'm trying to contact ODBC tables
Sometimes the connection fails
Is there a way to know when it fails?
I want to create conditions that if there is an error to wait a while (sleep) and then try again
How can you identify this kind of error?
My condition should look like this:
ODBC CONNECT TO DB (XUserId is USERNAME, XPassword is PASS);
if [Error: ODBC read failed] then
sleep 10000;
END IF
I want to run a loop 1 hour (every 10 minutes)
Thank you!
Play with:
ErrorMode |
ScriptError |
ScriptErrorDetails |
ScriptErrorCount |
ScriptErrorList |
functions. Set ErrorMode = 0 to prevent script from stopping, then read the error. repeat until no error or time > 1hour
Thanks for the tip
it works like this:
set ErrorMode=0;
FOR i=1 to 6 // 6times=1hour
ODBC CONNECT TO DB (XUserId is USERNAME, XPassword is PASS);
if ScriptError=0 then
SLEEP 6000000; //1000=1sec 6000000=10min
end if
NEXT