I am trying to insert an image into a VARBINARY(MAX) column. I get this error:
You do not have permission to use the bulk load statement.
To make sure you have the right permissions to use BULK commands follow the below
Now, in regards to the query your are using it's not quite right.
For creating the table
CREATE TABLE [dbo].[Stickers] (
[name] varchar(10)
, [category] varchar(10)
, [gender] varchar(1)
, [imageData] varchar(max)
)
For inserting the large value data
INSERT INTO [dbo].[Stickers] ([name], [category], [gender], [imageData])
SELECT 'Red dress'
, 'Dress'
, 'F'
, photo.*
FROM OPENROWSET(BULK 'C:\Users\username\Desktop\misc-flower-png-55d7744aca416.png', SINGLE_BLOB) [photo]
A couple of notes:
MSDN article for this: here