|
-
Sep 21st, 2007, 10:04 AM
#1
Thread Starter
Frenzied Member
How to extract the picture from database to the temporary folder in computer?
I have questions here. I use ADODB and Microsoft access
I have field name "Gambar" in the database with data type text. In the field,I have an image link for each record for example "C:\data\image1.jpg How I can extract the the image from database to temporary folder in the computer?This temporary folder will delate after the form unload. Any Idea or sample to start?
-
Sep 21st, 2007, 10:10 AM
#2
Re: How to extract the picture from database to the temporary folder in computer?
Thread moved to Database Development forum
Are you actually storing the picture in the database, or just the file name?
-
Sep 21st, 2007, 10:39 AM
#3
Re: How to extract the picture from database to the temporary folder in computer?
Si:
"I have field name 'Gambar' in the database with data type text. In the field,I have an image link for each record for example 'C:\data\image1.jpg'"
It sounds as if he's storing the file location. (How can you store a jpg image in a text field?)
Matrik, the file is already on the computer - in this case it's the file C:\data\image1.jpg. If you want it in a temporary folder, you'll have to write code to copy it from C:\data\ to the temporary folder. Then, to delete it "after unload", you'll have to write code to delete the file and close Access. (Or you could just use it from where it already is.)
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Sep 21st, 2007, 10:54 AM
#4
Re: How to extract the picture from database to the temporary folder in computer?
 Originally Posted by Al42
It sounds as if he's storing the file location. (How can you store a jpg image in a text field?)
Agreed, but it is possible that there is also a field that contains the picture.
-
Sep 21st, 2007, 10:59 AM
#5
Thread Starter
Frenzied Member
Re: How to extract the picture from database to the temporary folder in computer?
 Originally Posted by si_the_geek
Thread moved to Database Development forum
Are you actually storing the picture in the database, or just the file name?
It sound that, I have filename store in the database not the image . I would like to know how to store the picture in the database inside the field name "Gambar" ?I always use filename to store the image location in that field now I want to learn how to store the image itself not the storing the image path location. Do you have alternative way on how image store in the database? I use Microsoft access, I have 3 images in jpg format but in a small size. Do I need change the data type of my current field name?
-
Sep 21st, 2007, 11:03 AM
#6
Thread Starter
Frenzied Member
Re: How to extract the picture from database to the temporary folder in computer?
 Originally Posted by si_the_geek
Agreed, but it is possible that there is also a field that contains the picture.
What the field type that contains picture?
-
Sep 21st, 2007, 11:07 AM
#7
Thread Starter
Frenzied Member
Re: How to extract the picture from database to the temporary folder in computer?
 Originally Posted by Al42
Si:
to delete it "after unload", you'll have to write code to delete the file and close Access. (Or you could just use it from where it already is.)
Could you give me a sample to delete the temporary folder using code?
-
Sep 21st, 2007, 11:11 AM
#8
Re: How to extract the picture from database to the temporary folder in computer?
If you want to store the picture in the database, see the Tutorial about it in the FAQs & Tutorials thread at the top of this forum.
-
Sep 21st, 2007, 01:17 PM
#9
Re: How to extract the picture from database to the temporary folder in computer?
 Originally Posted by matrik02
Could you give me a sample to delete the temporary folder using code?
RmDir "C:folder\name\here\"
The folder has to be empty to delete it.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
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
|