How can I get ISQL.EXE to return a DOS errorlevel for me to test? - 05 Mar 1999

Neil Pike

March 4, 1999

1 Min Read
ITPro Today logo

A. Use the RAISERROR command with the following criteria :-

  1. Run ISQL with the -b option

  2. Set the message severity to greater than 10

  3. Set the message state to 127


isql -E -Q"RAISERROR ('set errorlevel 11',11,127)" -b iferrorlevel 11 goto failed

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like