[Solved] Insert an image in a column of a table that already has 5 columns


I’m not sure you can do that the way you’re trying, Why don’t you load the image into a variable then use that variable in your insert statement:

declare @image varbinary(max)

set @image = (SELECT BulkColumn from Openrowset( Bulk 'C:\Users\Yassine-Kira\Desktop\Templates\ProductImg\elite-book_tcm_133_1096796.png', Single_Blob) as BikeImage)

insert into dbo.Produit 
values
('Pc portable',
 'HP EliteBook série p',
 'Un ordinateur...',
 @image,
 20,
 4999,
 0);

3

solved Insert an image in a column of a table that already has 5 columns