Sthrudel 2006-09-05 11:45:43
Is it possible to manually insert some data into image column in MSSQL
I have defined a table that contains image column for inserting some
binary data. I don’t have the logic for inserting that data into
database but I would already like to get some data from the database.
Jens 2006-09-05 11:46:03
No, you can t do that in SQLMS. But inserting data is straight
HTH, Jens Suessmeyer.
Erland sommars 2006-09-05 19:46:31
First of all, the combination of “image” and Management Studio, triggers
my “don’t do that!” knee-j*** reaction.
That is, on SQL 2005 there is a new data type, varbinary(MAX), which just
like image permits storage up to 2 GB. But in difference to image,
varbinary(MAX) works just like the regular varbinary data type, and you
don’t have to deal with the many quirks of image.
Of course, you may using SSMS to connect to SQL 2000, or you have a
requirement to support SQL 2000. But if you target SQL 2005 only, there
is little reason to use image.
As for your question, the answer is “in theory, yes”. You can simply
INSERT tbl (keycol, imagecol)
VALUES (1, 0x1212ABCC…)
To insert meaningful data this way, you would first have to get a hex-string
representation of your data.
Erland Sommarskog, SQL Server MVP, email@example.com
Books Online for SQL Server 2005 at
Books Online for SQL Server 2000 at