Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.


Data Source Connection check


Lately we have had a few issues with one of the ODBC connections that we use which essentially stops anyhting connecting to the source data.

From a QlikView perspective we just get an error during reload and since we are running reloads through the night this causes the whole reload to essentially pause untill the error is cleared.

(n.b. we are contolling our reloads via batch files.)

I was wandering if there was a way within the script to test the connection before running a reload against it and therfore mitigating any error messages so that the whole process is not stopped.

Thanks in advance


1 Reply
Valued Contributor II

Re: Data Source Connection check

Hi Jay,

You can build something like this into your code ...

     SET ErrorMode = 0; // disable error trapping

     ODBC CONNECT32 TO xODBC_to_TextFile;

     x = msgbox(scripterror);

     // or x = msgbox(scripterrordetails);

     SET ErrorMode = 1; // re-enable error trapping

So if the value of scripterror is clear proceed, if not exit script. In my example, there is no ODBC named xODBC_to_TextFile so an error is raised.