From: Dan Bridgland on
Hi, I'm trying to fetch and insert an image into a column, but I keep
getting an error: Cannot bulk load because the file "http:\
\www.google.co.uk/images/nav_logo7.png" could not be opened. Operating
system error code 123(error not found).

Here is my query:


declare @BLOBTest table (BLOBName VarChar(50), BLOBData
VarBinary(Max))
INSERT INTO BLOBTest
(BLOBName, BLOBData)
SELECT 'First test file',
BulkColumn FROM OPENROWSET(
Bulk 'http:\\www.google.co.uk/images/nav_logo7.png', SINGLE_BLOB)
AS BLOB

select * from @BLOBTest


Any ideas?
From: Plamen Ratchev on
The data file cannot be from a web source. You can use client side code to save the file to local file system and then
import to the database (or read client side as binary stream and then save to the database).

--
Plamen Ratchev
http://www.SQLStudio.com
From: Dan Bridgland on
Thanks, but is there really no way to automate this from the SQL
Server?



Plamen Ratchev wrote:
> The data file cannot be from a web source. You can use client side code to save the file to local file system and then
> import to the database (or read client side as binary stream and then save to the database).
>
> --
> Plamen Ratchev
> http://www.SQLStudio.com
From: Plamen Ratchev on
I know you can call a web service from CLR, so you may model something based on that. But really SQL Server is not the
right place to handle it.
http://davidhayden.com/blog/dave/archive/2006/04/25/2924.aspx
http://www.databasejournal.com/features/mssql/article.php/3821271/article.htm

--
Plamen Ratchev
http://www.SQLStudio.com
From: Dan Bridgland on
Hi Plamen

Thanks, Ill look into those.

Regards
Dan
 | 
Pages: 1
Prev: Editing Multiple SPs
Next: Drop time conditionally