Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Image field

Author  Topic 

Mazdak
Yak Posting Veteran

63 Posts

Posted - 2002-08-14 : 03:30:31
I don't know if it is ok to post this question here or not.

Can someone give me some suggestion about how to read a Image field from database and show it in my application?I use VC++.

thanks

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-08-14 : 08:26:03
There is a link in the SQL Team FAQ that has some code to retrieve the image in an ASP page, you can probably convert it to C++ without too much trouble.

Also try these ASP sites:

www.4guysfromrolla.com
www.15seonds.com
www.aspalliance.com
www.asp101.com

Also look at the ADO documentation for the Stream object, it is the preferred method for retrieving binary data from a database. You can get the latest docs from [url]http://www.microsoft.com/data/download.htm[/url], look for the MDAC SDK, download and install it, and look for ADO260.CHM, that's the help/documentation file. There are code examples in C++ for pretty much everything.

And if you have the opportunity to move the image data out of the database into files, I recommend you do so, so you won't have to deal with this issue.

Go to Top of Page
   

- Advertisement -