I'm trying to insert an image into SQL Server using this SQL query
INSERT INTO dbo.Employees(ImageColumn)
SELECT BulkColumn
FROM OPENROWSET(BULK 'C:\Users\ahmed\Desktop\employee.jpg', Single_Blob) AS img
but I'm getting this message:
Msg 4861, Level 16, State 1, Line 3
Cannot bulk load because the file "C:\\Users\\ahmed\\Desktop\\employee.jpg" could not be opened. Operating system error code 5 (Access is denied.).
Try logging in to SSMS under the sa account and try that. I have a lot of permissions issues when I'm logged in as myself, even if I'm logged in with admin privileges.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.