I'm trying to storage in my database an image, so I have created a column named images in a table of my database with "blob" type.
Then I have found on the internet that if I want to add an image to my database i have to write this little code :
INSERT INTO tableName (ImageColumn)
SELECT BulkColumn
FROM OPENROWSET(BULK 'image..Path..here', Single_Blob) AS img
But when I execute this code, I get some errors and I'm trying to fix that before asking a question here but after 3 hours of research I'm here to asking you guys for some help.
Here are the error I get:
Unexpected token. (near "(" at position 73)
Unexpected token. (near "Bulk" at position 75)
Unexpected token. (near "'image..Path..here'" at position 80)
Unexpected token. (near "," at position 99)
Unexpected token. (near "Single_Blob" at position 101)
Unexpected token. (near ")" at position 112)
Unrecognized keyword. (near "as" at position 114)
Unexpected token. (near "img" at position 117)