tsandeep1407 (3/21/2013)
Hi everyone,I have this error output in SSMS for the following query
exec Master..xp_cmdshell 'bcp "select blobdata from SynDocs.dbo.BLOBDATA where blobid = 2" queryout "c:\filename2.img" -S ROK-W7STHONUK-7 -T'
The output is 2 rows
NULL
Enter the file storage type of field blobdata [image]:
when i run the same query thru cmd prompt, the result is
SQLState = S1000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unable to open BCP host data-file.
any of you help me with this please.
I know it's an older post but the problem here is that the "-c" parameter wasn't specified. I would also recommend the "-C Raw" parameter (notice the difference in case) but leaving that out isn't a showstopper.
--Jeff Moden
Change is inevitable... Change for the better is not.