Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi dear experts,
there's any way to save the connection result in a variable or something,
I mean if the connection is success or not then sabe that result in a boolean or something like that?
regards Experts.
maybe
// on error continue
set ErrorMode=0;
// wrong connection
OLEDB CONNECT32 TO [Provider=OraOLEDB1.Oracle.1;Persist Security Info=True;User ID=test;Data Source=dev11;Extended Properties=""] (XPassword is EJXTIKVITCVUM);
// store result
set vResult=$(ScriptError);
trace connection result is $(vResult) ;
// halt andprompt user on error
set ErrorMode=1;
the execution log is
Connecting to Provider=OraOLEDB1.Oracle.1;Persist Security Info=True;User ID=test;Data Source=dev11;Extended Properties=""
Failed to connect
connection result is General Error
Thanks Massimo,
I only replace the variable ScriptError with ScripErrorcount
just one more think ,
there's any way to send the ODBC since a variable?
Regards.