Microsoft KB Archive/121832

{|
 * width="100%"|

BUG: 32-bit ISQL.EXE Does Not Properly Set ERRORLEVEL

 * }

Q121832

-

The information in this article applies to:


 * Microsoft SQL Server versions 4.2x, 6.0

-

BUG# NT: 10377 (4.21)

SYMPTOMS
The 32-bit version of ISQL.EXE does not properly set ERRORLEVEL under certain conditions. If arguments or data for arguments are invalid, the ERRORLEVEL used for batch file processing under Windows NT is not set to 1.

The following is an sample .CMD file run under Windows NT normally used for batch file processing:

  echo off isql /Usa /P /i test.sql if errorlevel 1 echo Error! echo on

In this situation, TEST.SQL does not exist. Therefore, ISQL will display an error to stdout indicating an invalid input file. However, errorlevel is not set to 1.

WORKAROUND
Use the 16-bit MS-DOS or OS/2 version of ISQL.EXE on Windows NT.

STATUS
Microsoft has confirmed this to be a problem in the products listed at the beginning of this article.

Additional query words: Windows NT

Keywords : kbtool

Issue type :

Technology : kbSQLServSearch kbAudDeveloper kbSQLServ600 kbSQLServ420OS2