文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Returning an ERRORLEVEL to DOS prompt from OSQL or SQLCMD utility

Returning an ERRORLEVEL to DOS prompt from OSQL or SQLCMD utility

时间:2011-06-07  来源:现古行

Cracked how to return a non zero exit code from a call to osql back to a dos batch file.

The answer is as follows. Note the bits in bold below are most important, and the use of the single & sign to denote running the IF ERRORLEVEL 1 command even if the previous osql command errors.

for /F %%i in ('dir *.sql /b') do osql -b -E -S MyServer\InstanceName -d MyDatabase -i %%i & IF ERRORLEVEL 1 goto ABORTBATCH

相关阅读 更多 +
排行榜 更多 +
翌日波奇狗的历险记手机版下载

翌日波奇狗的历险记手机版下载

休闲益智 下载
怪兽远征安卓版下载

怪兽远征安卓版下载

角色扮演 下载
谷歌卫星地图免费版下载

谷歌卫星地图免费版下载

生活实用 下载