Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error Mode Problem

Hi all ,

I am using Incremental Load Script with ErrorMode. My ErrorMode syntax does not work when server not connecting to the database.

(It is not ignoring the failure and continue script execution.)

Kindly correct my below script if there is any error .

Let ThisExecTime = Date(Now( ),'YYYY-MM-DD hh:mm:ss')';

Let ReloadTime= Date(ReloadTime( ),'YYYY-MM-DD hh:mm:ss')';

Set Error Mode=-0;

ODBC connect to [SQLDATA;database=SQL1] (UserId is sa, Password is admin);

QV_Table:

SQL SELECT PrimaryKey, X, Y FROM CUSTOMER

WHERE ModificationTime >= #$(LastExecTime)#

AND ModificationTime < #$(ThisExecTime)#;

Concatenate LOAD PrimaryKey, X, Y FROM File.QVD

WHERE NOT EXISTS(PrimaryKey);

Inner Join SQL SELECT PrimaryKey FROM CUSTOMER;

If ScriptErrorCount = 0 then

STORE QV_Table INTO File.QVD;

Let  ReloadTime= ThisExecTime;

End If

Drop Table QV_Table;

if ErrorMode=0 then

End if

Exit Script;

5 Replies
dinuwanbr
Creator III
Creator III

Hi,

If ErrorMode = 1, the script execution stops and it is prompted to user. 

If ErrorMode = 0, then script execution simply ignores current statement and follows executing next statements


In your Script:

      Set Error Mode=-0;

But It should be Set Error Mode=0; (remove - sign)


regards,

Dinu'1

Not applicable
Author

Here I entered Wrong. I have given Set Error Mode =0; in my original script. it doesn't work.

Regards,

Sivasu

dinuwanbr
Creator III
Creator III

Hi,

I checked following code and it works fine to me. (example)

set errormode=0;

ODBC connect to [SQLDATA;database=SQL1] (UserId is sa, Password is admin);

LOAD * INLINE [

    Code, Name

    1, A

    2, B

    3, C

];

What is the reloading error you are getting? Check it. May be the wrong is with rest of the script.

regards,

dinu'1

Not applicable
Author

It works in normal script but not in incremental load script.

I am getting error as "Server does not exist or access denied".

dinuwanbr
Creator III
Creator III

Can you upload the application. (Sample)

-dinu1