Hi Greg That should work if the file is accessible by the SQL Server process. The path 'E:\icons\SM\accicons04.ico' must be on the SQL Server's local file system - not the client machine unless it is the same machine. Also, the account that is running the SQL Server service will need sufficient file system privileges to open the file.
Cheers Chris From: [email protected] [mailto:[email protected]] On Behalf Of Greg Keogh Sent: Sunday, 27 June 2010 2:33 PM To: 'ozDotNet' Subject: [OT] Loading file into a row Who's working on Sunday? ... I'm trying some sample code that is supposed to bulk load a file into a varbinary column of a table. My statement is this: UPDATE TestTable set [Icon] = (SELECT * FROM OPENROWSET(BULK 'E:\icons\SM\accicons04.ico', SINGLE_BLOB) AS x ) WHERE [Name]='Foo' But I get this: Cannot bulk load because the file "E:\icons\SM\accicons04.ico" could not be opened. Operating system error code 3(The system cannot find the path specified.). I get a "not found" on every file I try anywhere, so I guess I'm missing some security related trick. Anyone know how to do this? Cheers, Greg
