Click here to Skip to main content
15,886,422 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all...
I have a table image in SQL server database having two columns ID and Image (Datatype image). I have saved an image in SQL server database. Now i want to retrieve it from database and display in mfc project.I am using ADO recordset with DSN less connection.
I have an idea that "you have to copy the jpeg as bytearray to a MemoryStream. From that stream yo shall be able to load the JPEG."
but how i can copy JPEG from database to memory strem in mfc.
Pls Help...

EDIT: Repost from How-to-get-image-from-SQL-server-database-into-MFC[^]
Posted
Updated 17-May-10 1:07am
v3

1 solution

Write the image to a file and load the image using SHLoadImageFile to a picture control.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900