Skip navigation

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

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

i.e.

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


TAGS: SQL
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish