我在SQL查询分析器中执行“master..xp_cmdshell 'bcp "SELECT au_fname, au_lname FROM pubs..authors ORDER BY au_lname" queryout D:\authors.xls -c -S"zdh013" -U"" -P""'”,其中zdh013为服务器名,用户名和密码为空,结果可以准确的把数据导出,但是在Delphi中调用SQL语句就不行了,也没有报错,不知道是怎么原因?请各位高手大人指点,我用的是ADOCommand控件,代码如下:procedure TForm1.Button1Click(Sender: TObject);
begin
  ADOCommand1.CommandText:='master..xp_cmdshell ''bcp ''''SELECT au_fname, au_lname FROM pubs..authors ORDER BY au_lname'''' queryout D:\authors.xls -c -S''''zdh013'''' -U'''''''' -P''''''''''';
  showmessage(ADOCommand1.CommandText);
  ADOCommand1.Execute;
end;