How can I import a PNG to an SQL Server database installed in a machine where I'm not granted access (except to the DB instance)?
I cannot do the following because I cannot access the disk:
INSERT INTO [dbo].[WorkItemState] (ImageBits)
SELECT BulkColumn
FROM OPENROWSET (BULK 'C:\checkbox.png', SINGLE_BLOB) as MyImage
Is there a way to convert the PNG to a recognizable format that I can simply copy/paste on my table column?
You can encode your image with base64 like:
cat YOUR_IMAGE.png | base64
or directlybase64 YOUR_IMAGE.png
and add the output to your database.