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



Okay,
I am now able to insert the data correctly using a TADOtable and view the
image in a TDBImage.
Thanks
Larry

"Brian Bushay TeamB" <BBushay@xxxxxxxxx> wrote in message
news:1ieai3p4bn4tprc2pnv7o4t5b8dr00s8ui@xxxxxxxxxx

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


.