Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Forum
I have a Batfile (this has 100 lines approx) that loads data from progress database . Sometimes I obtain the next error with direrent tables:
SQL Error:[OpenLink][ODBC][Driver]Syntax error or access
SQL Scriptline:
SQL State:37000
SQL SELECT ter ,
ter1
FROM NOV
If i test the ODBC it´s OK (Administrative Tools -> Data Sources(ODBC). And if i run the script from QlikView It´s works OK.
The issue occurs (sometimes) with the schedule Task. But i dont know why.
Basically I need to ensure the daily reload . What is the proper way of doing this?
Thanks a lot.
Are you sure that required server is always available? If not, you may build a loop within the batch ("IF ERRORLEVEL = 1 ...."). When there are constant transactions going on, the parameter "NO LOCK" in the SQL-query may help.
HTH
Peter
Thanks for your reply. i think that the server is available. I have two servers A (Production) and B (Test).
Because i have to migrate to new server (B). A and B are conected to the same Progress Database.
The shcedule tasks (A and B) run at the same hour. Server A works OK. But sometimes Server B generates the error
(SQL Error:[OpenLink][ODBC][Driver]Syntax error or access) with diferernt tables.
How can i build the loop ?
Thaks a lot.
You may have a look into the structure of batch-files, but script should look like (untested):
:Reload
SET Errorlevel = 0
... Here comes your reload-sequence
IF Errorlevel 1 THEN GOTO Wait
:Wait
WAIT 60
GOTO Reload
:End
.... Clean up and finish
Reload-sequence is typically like "C:\Program Files\QlikView\QV.exe" /r "C:\Directory\QVapplication.qvw"
Wait-command tells the batch to wait xxx seconds before reloading.
HTH
Peter
Thanks a lot Peter.