
CODE: [Copy to clipboard]在BCP IN 出现主键重复这个错误时,怎么才能让能让批处理跳到:error这里?@echo off
echo _______BEGIN______>>test.txt
[b]bcp "fee.dbo.Slip" in "Slip.dat" -S. -Usa -P -n -E
if errorlevel 1 goto :error[/b]
goto :end
:error
date /T >>test.txt
time /T >>test.txt
there is an error >>test.txt
goto:end
:end
echo _______END______>>test.txt
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |