Link to home
Start Free TrialLog in
Avatar of grendel777
grendel777Flag for United States of America

asked on

Why does this OPENROWSET(BULK... statement give an error?

Hello, I'm trying to import images from the file system into a column of data type 'image'.  An expert pointed me to the OPENROWSET(BULK... statement, but the code below gives an error:  Incorrect syntax near the keyword 'BUKL'.  Any ideas why?  The server is Microsoft SQL Server Workgroup Edition.  Any help is appreciated.
UPDATE db1.dbo.ImageValues SET Value =
  (SELECT * FROM OPENROWSET( BULK 'c:\...\Image 32.JPG', SINGLE_BLOB))

Open in new window

Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

what version of SQL Server are you using?
Hi,

Add a comma after the word bulk ...

BULK 'c:\...\Image 32.JPG', SINGLE_BLOB

Cheers
  David
Avatar of grendel777

ASKER

2005 Workgroup Edition, v. 8.00.2187 on NT 5.2.  Comma doesn't seem to help.  Do I need to use the UNC rather than the local file name?
ASKER CERTIFIED SOLUTION
Avatar of grendel777
grendel777
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial