Re: Inserting and accessig Image (bmp) data in an SQL 2005 database.




I insert the data using:
INSERT INTO [YieldPlusNG].[dbo].[QCButtonSettings]
([BtnCaption], [BtnScore], [BtnImage],[Abbr])
VALUES ('bmp' ,20, 'C:\temp\ImageBlob\Pictures\btn3.bmp' ,'SC')

A cursory view of the table in the Management Studio shows that the data
appears to be inserted. For a sanity check, I threw a datasource and a
simple query in a form and bound it to a TdbImage. In attempting to view
the Image in design time I get a "BitMap Image is not Valid".

I have open and resaved teh images in Paint to insure they were standard 24
bit BMP's.

Can someone get me started on saving and retrieving image data?

I would use a parameter in the Values for the image then use
parameter.loadfromFile to get the bitmap into the parameter.
--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.


Quantcast