Jamal Salman
Jamal Salman

Reputation: 367

Image appearing as <Binary data> in sql server

I want to store an image in sql server using C# , the data type of my field is image and so I am passing a byte array to the image fields and all I get on all the records is Binary data. Is this how it is supposed to work or what? Thank you for your help.

Upvotes: 0

Views: 1620

Answers (2)

Jamal Salman
Jamal Salman

Reputation: 367

As @AlexK. pointed out,

in Management Studio's "Table View" you will see for image/varbinary columns. If you run a SELECT it will be displayed in hexadecimal format in the Results View

and @Yogi noted:

Please note that Image data type will be removed in a future version of SQL Server. Avoid using these data types in new development work. Use varbinary(max) instead.

Upvotes: 0

Yogi
Yogi

Reputation: 9769

Yes it is going to store the image as binary data from 0 through 2^31-1 (2,147,483,647) bytes.

Please note that Image data type will be removed in a future version of SQL Server. Avoid using these data types in new development work. Use varbinary(max) instead. (Ref)

Upvotes: 1

Related Questions