I have a SQL Server 2008 database with a table containing an image column.
Any idea how to write query to insert bin file to the image field?
Thank you in advance!
Totally agree with marc_s.
But your query will be something like this.
INSERT yourtable(ImageColumn)
SELECT image FROM
OPENROWSET(BULK, 'filename.png', SINGLE_BLOB) AS blobtable(image)
ntext,text, andimagedata types will be removed in a future version of SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Usenvarchar(max),varchar(max), andvarbinary(max)instead.