Wednesday, March 28, 2012

Images in SQL Server

I've got to storesome images (*.ico format) in my database.

I think I've found a way
but when I want to diretly show them
in a connected data grid (Visual Basic)...
I don't see the image but only a number

Is it the storing that I screwed up
or the displaying ?From BOL:
Data in an image data is stored as a string of bits and is not interpreted by SQL Server. Any interpretation of the data in an image column must be made by the application. For example, an application could store data in an image column using a BMP, TIFF, GIF, or JPEG format. The application that reads the data from the image column must recognize the format of the data and display it correctly. All an image column does is provide a location to store the stream of bits that make up the image data value.

Yet the best practice is to store the image some where on the disk and save the pointer to it in the database.|||Since I've posted my thread
I've succedeed on automatically displaying BMP files in
my grid component (VB programming)
but the ICO files are invisible

I've got an other component that successfully
shows both type of file so I'm now sure
that the pictures are correctly saved into the DB
and it is the Grid component that do not retrieve ICON
correctly|||people for more info

see the thread
"Inserting pictures in DB - For VB programmers"sql

No comments:

Post a Comment