-
January 25th, 2015, 02:35 PM
#1
How to insert and read image from database (sql server) using MFC ?
How to insert and read images to/from database (sql server) using MFC ?
an example or a reference would be appreciated
-
January 26th, 2015, 09:13 AM
#2
Re: How to insert and read image from database (sql server) using MFC ?
Any image is just a number of bytes from database standpoint. So, to store images, your database column must be of some binary type, the size enough to store any possible image size.
Using CLongBinary for BLOBs
Best regards,
Igor
-
January 27th, 2015, 05:04 AM
#3
Re: How to insert and read image from database (sql server) using MFC ?
Or use the CByteArray class...
Victor Nijegorodov
-
January 29th, 2015, 04:14 PM
#4
Re: How to insert and read image from database (sql server) using MFC ?
Thanks for the reply .
I did use Image , Istreams, and bytes class.
This source helped a lot .
http://www.codeproject.com/Articles/...y-show-picture
-
January 29th, 2015, 04:39 PM
#5
Re: How to insert and read image from database (sql server) using MFC ?
Originally Posted by Artista
What does that project have to do with your question?
-
January 30th, 2015, 04:36 AM
#6
Re: How to insert and read image from database (sql server) using MFC ?
Originally Posted by GCDEF
What does that project have to do with your question?
Download the demo and check the code.
Actually my real problem was reading the picture then write it to an array of bytes so I used
"while(cFileStream.Read(array, size)"
.. And also loading the image I had did transfere bytes to an Istream obj. then using the Image class I loaded it easily.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|