title: XP_CMDSHELL bcp error
body: <p>I am executing the XP_CMDSHELL as below:</p>
  
  <pre><code>Exec XP_CMDSHELL 'bcp "Select OrderID, OrderDate, OrderDesc from DB.dbo.Order" queryout C:\Orderfile.txt -k -t \t -c -Slocalhost -T'
  </code></pre>
  
  <p>I got the following error:</p>
  
  <p>"Unable to open BCP host datafile."</p>
  
  <p>I looked at the c:\ drive and there is a file Orderfile.txt exist. ANd i have not opened the file or any other program doesn't not the file. But still I am getting this error.</p>
  
  <p>Anyone have any idea why I am getting this error? Thank you in advance.</p>