Discussion Board for collaboration on QlikView Scripting.
Im using ODBC CONNECT32 TO [$(vDbInstance);DBQ=$(vDbInstance)] (UserId is $(vDbUsername), Password is $(vDbPassword)); to connect to my database. How to handle when database conneciton not available ?
ODBC CONNECT32 TO [$(vDbInstance);DBQ=$(vDbInstance)] (UserId is $(vDbUsername), Password is $(vDbPassword));
if ScriptError >= 1 then // or ScriptError > 1
CALL Log('WARN:Error in commection - ' & '$(vDbInstance)' & ',cannot continue' );
Script execution says
Failed to connect
Error Msg Box
SQL##f - SqlState: S1000, ErrorCode: 12541, ErrorMsg: [Oracle][ODBC][Ora]ORA-12541: TNS:no listener
ODBC CONNECT32 TO [dim74t1;DBQ=dim74t1] (UserId is IBI, Password is IBI)
Would pingin the server help you?
Thanks Rakesh , will try that.
any Idea why it didnt catch up wtih ErrorCode >1 ?
you could use the Oracle program tnsping:
execute cmd.exe /C "tnsping dim74t1 >tnsping.out";
FROM tnsping.out (txt, codepage is 1252, no labels, delimiter is '\t', no quotes)
IF NoOfRows('tnsping') THEN
TRACE TNS:no listener;