Hi I need to create a trigger on a table which bcps the table out to a flat fine. I am getting the error "Error = [Microsoft][ODBC SQL Server Driver]Unable to open BCP host data-file"
Although if I run the bcp command separately I do not get this error and the command runs successfully. I am using the Exec Master..xp_cmdshell command.
Error = [Microsoft][ODBC SQL Server Driver]Unable to open BCP host data-file"
this error occurs when you give the output path as a directory which does not exist. i.e. you give the path as C:\enigma\enigma.txt even though the directory enigma does not exist on your PC. Create the directory and reissue the command. The BCP command only creates a data file ... not the directory