執行
exec master..xp_cmdshell 'BCP "select ImgFile from T_AD" queryout "c:\v.txt" /S "dc1" /U "sa" /P "87920770" -c '
報這個錯誤碼SQLState = 42S02, NativeError = 208
Error = [Microsoft][SQL Native Client][SQL Server]無效的物件名稱 'T_AD'。
SQLState = 42000, NativeError = 8180
Error = [Microsoft][SQL Native Client][SQL Server]陳述式無法準備。
使用全称试试.
数据库名..T_AD
因为默认是Master数据库