title: SQLState = S1000, NativeError = 0
body: <p>I am getting this Error While I try to do BCP</p>
  
  <blockquote>
    <p>SQLState = S1000, NativeError = 0</p>
    
    <p>Error = [Microsoft][SQL Server Native Client 11.0]Unable to open BCP host data-file</p>
  </blockquote>
  
  <p>This is my code:</p>
  
  <pre><code>DECLARE @dump_data1 varchar(500)
  
  SET @dump_data1 =  'bcp "select * from IDcountries.dbo.IDs$" queryout "\\NetworkLocation\watchdog.xls" -c -S STRIVEDI\SQLEXPRESS -T'
  
  EXEC xp_cmdshell @dump_data1
  </code></pre>
  
  <p>I do have all the rights on Network Drive.</p>
  
  <p>This code perfectly works fine for destination of my local drive like <code>C:\</code>.</p>
  
  <p>I also tried entering <code>-U</code> and <code>-P</code> options as well. But, no luck</p>
  
  <p>Can someone please help me on this issue?</p>