Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I upload a bitmap to access DB

Status
Not open for further replies.

martindavey

Programmer
Jan 2, 2000
122
GB
My column is an ole object.
I can retreive and display bitmaps.
But I can't upload them.

I'm using <input type=&quot;file&quot; name=&quot;photo&quot;>
then insert into photo = ......photo

But it ends up in access as a binary thingy...

How can I make sure it uploads as a bitmap????
 
Sorry for not giving an answer to your question, but I think it's a bad idea to save files in a database, especially when it's an Access database.
Consider saving the path to your bitmap in the database (i.e. in a memo field) and save the bitmap on your filesystem. Good luck!

<webguru>iqof188</webguru>
 
yess... i think it's better for you to save the path to the file in the database rather than saving the file itself. I'm using the same method for my oracle db.
Nor.
 
You problem is that the form needs to be multipart and you need a procedure or component to upload the file.
<tangent>
As igof188 said it is not a good idea to store a file in an Access Database. Store a path instead.
<end of tangent>
The file will be passed as a parameter to the page specified in the action clause of your form. It is here that the component will grab the information and shove it into a file. Writing a component to upload a file is not as easy as it seems, not very hard either. Luckily there components out there (some free, some not) that will do that part for you.

Moral of the Story:
<input type=&quot;file&quot;> is not enough to upload a file by itself.
Wushutwist
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top