Hi,
How can I use ADO to store and retrieve a file from a
database. What are some things that I need to know or do?
Printable View
Hi,
How can I use ADO to store and retrieve a file from a
database. What are some things that I need to know or do?
to give us a bit of a hand, when you say you want to store a file to a database, what database are you using, how big is the file, is it a text file?
this might help you get a better answer...
Hi,
Thanks for your reply. I'm planning on using a ACCESS
Database to store image files (JPG,GIF etc..) .
BTW : Could this also me implemented on a SQL Server?
Thanks
ok, i'm not sure 100% on the total solution but i believe you can use memo fields in access to save pictures etc. I've only really used them to store large text fields (greater than 255 characters) and i know they have a max length of about 64000 characters. So this might mean that your pictures cannot be bigger than 64k in size - i'm not sure.
also - you can use the "appendchunk" method to append binary data to an ado field - so i think you could use this.
what i'm not sure on is how to read in your binary data from the picture files that you have. I'm still looking for that now...
hope this might help
btw i assumed you know how to use ado to put normal data to a database seeing as though you have many posts. is this true?
Hi,
I know how to store normal data to a database but I
don't know to use AppendChunk and stuff like that to
store files to a database. I've recently written a Family
Address Book Program that uses ADO and I was hoping to
allow the use to store photos in the next version.
Take a look at it (full source code.)
http://www.planetsourcecode.com/vb/s...xtCodeId=10324
Please Vote If You Like It :) :)
[Edited by omarswan on 08-02-2000 at 11:11 PM]