English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i am using visual basic 6.0

2006-07-27 20:23:55 · 4 answers · asked by nagrial 1 in Computers & Internet Programming & Design

4 answers

It is best to store the path to the image, rather than the image itself, as getting binary data into and out of tables can be quite the headache, apart even from size and scalability concerns.

"it will get very big because access uses bitmaps". It will not get very big because access uses bitmaps. When you read in a JPEG to a table, it's not going to suddenly convert it to a bitmap. The database will, however, grow to more than the size of the images contained in it, and "Compact & Repair" won't do much to help. Also, when you're reading it in and out of the table, one tiny mistake could ruin your image, and then you've lost data.

The method I prefer is to pick a folder (publicly available on the server if this is for multiple users), and store all of my images there. In the database, I won't store the full path, just the "myimage.gif" (or more often "ID732.gif". When a user adds an image, I copy it to the standard folder, and when they remove it, I delete it (or archive it to a "deleted images" folder).

If you're dead set for storing them in the tables as binary data, visit the source below. It talks about both methods, and gives example code for each.

2006-07-27 20:41:37 · answer #1 · answered by Hulett H 2 · 0 0

You store the path and filename to the image in the database, not the actual image itself.

2006-07-28 03:26:18 · answer #2 · answered by TrickMeNicely 4 · 0 0

i wouldnt store pics in access dbs, because the db will crash if there are too much pics, also it will get very big because access uses bitmaps

2006-07-28 03:33:29 · answer #3 · answered by ryo_minoru 3 · 0 0

if you are specific in storing the images in MDB, use binary mode to update it.

2006-07-28 03:31:21 · answer #4 · answered by gansatanswers 3 · 0 0

fedest.com, questions and answers