Home Forums SQL Server 7,2000 T-SQL BCP error -Unable to open BCP host data-file RE: BCP error -Unable to open BCP host data-file

  • Gentlemen

    I am using BCP in a stored procedure to create an excel XML file

    everything goes fine and i get the following output when the BCP command is executed

    NULL

    Starting copy...

    NULL

    4 rows copied.

    Network packet size (bytes): 4096

    Clock Time (ms.) Total : 1 Average : (4000.00 rows per sec.)

    NULL

    but the problem is i cannot find the file that is created/or should have been created

    SET @testString2 = 'BCP "SELECT MAN_Content FROM [DBNAME].[dbo].[TABLENAME] ORDER BY id" queryout "C:\Temp\ECC_MSXLSBySQLServer2005.xls" -C RAW -S SERVERNAME -T -w'

    Exec Master..xp_cmdshell @testString2

    I cant find the file , which i assume should be in my C drive inside temp folder.

    any help shall be highly appreciated.

    Regards

    Zeeshan