Save image in the database
hi every one
i have done a program to scan images by scanner, but i have a problem how to save it in a database.
please replay as soon as possible
What database are you using? How you do things depends on how your database handles images.
Also can you please stop putting "please replay as soon as possible". Everyone here (except the admins) does this on a volunteer basis. You get a reply if someone who knows the solution to your problem reads your post. We always try to reply to everyone as soon as we can.
replay ... !
the database that i use is Access 2000.
Here is a basic example on how to do it with ADO. I have put this up on my site but would not suggest putting Pictures files in any database. One it makes the database huge, two it makes it hard to retrieve the files if you decide you no longer want them in the database, and three it is not a good practice to do this. The best way to do this is design your program to store locations to you files in the database and the reference them that way.
LOCATION = c:\mypics\
in the mypics folder you have all the images..
ADO Database Picture Example
you can save the image files as binary long object's (set the field type to ole object in access).
then use ado's append chunk and getchunk methods to write and read your file data from / to byte arrays read using get, i think.
Sorry folks - didn't see the reply above
Last edited by epl; May 17th, 2003 at 07:54 AM.
Hey epl good reply and you are correct. The link to the example I have that is posted above does just that.
thanks for every one who help me in solving my problem. I will try it later.