Solved

ASP - Upload Files - MySql Blob

Posted on 2009-07-07
8
582 Views
Last Modified: 2012-08-13
I am trying to find out what is the best method on Uploading Images (up to 3) from Classic ASP.  Then have them be stored in a MySql Blob.  Then I will show them in a results page... but that is later.  Any pointers?  My site is being hosted on Godaddy.
0
Comment
Question by:vbjohn
  • 4
  • 4
8 Comments
 

Author Comment

by:vbjohn
ID: 24795302
BTW:
I have the database as:
Table = Property
fields = pImage1, pImage2, pImage3
0
 
LVL 12

Expert Comment

by:R_Harrison
ID: 24795695
The best option is to find out what components GoDaddy has installed - e.g ABCUpload, etc... If they have a component installed then it should be fairly easy and straightforward.   If not, then you will need to look at using a PureASP upload function.
0
 

Author Comment

by:vbjohn
ID: 24795705
ASPUpload
0
 
LVL 12

Expert Comment

by:R_Harrison
ID: 24796321
Take a look at,

http://www.aspupload.com/manual_memory.html

Here you will find example code to do what you are after as well as the full manual for aspupload.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:vbjohn
ID: 24814853
That link did not tell me anything.
0
 
LVL 12

Expert Comment

by:R_Harrison
ID: 24831871
OK, will try and paste you some code shortly...
0
 
LVL 12

Accepted Solution

by:
R_Harrison earned 175 total points
ID: 24840354
Below is the code for 2 pages.   Make sure your FORM ACTION points to the database page that you create.

I don't have ASPUPLOAD so I can't test it, but according to the manual this should work, but let me know if you have any problems.
///  THE CODE BELOW IS FOR THE FORM PAGE ////

<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="DatabasePage.asp">

Select file: <INPUT TYPE="FILE" SIZE="40" NAME="FILE1"><BR>

Select file: <INPUT TYPE="FILE" SIZE="40" NAME="FILE2"><BR>

Select file: <INPUT TYPE="FILE" SIZE="40" NAME="FILE3"><BR>

<INPUT TYPE=SUBMIT VALUE="Upload!">

</FORM>
 
 
 

///  THE CODE BELOW IS FOR THE DATABASE HANDLING PAGE ////

<%

Set Upload = Server.CreateObject("Persits.Upload")

Upload.Save
 

// ADD YOUR DATABASE CONNECTION STRING HERE

rs.Open "Property", Connect, 2, 3

rs.AddNew

Set File = Upload.Files("FILE1")

If Not File Is Nothing Then	rs("pImage1").Value = File.Binary

Set File = Upload.Files("FILE2")

If Not File Is Nothing Then	rs("pImage2").Value = File.Binary

Set File = Upload.Files("FILE3")

If Not File Is Nothing Then	rs("pImage3").Value = File.Binary

rs.Update

// CLOSE DATABASE CONNECTION HERE

%>

Open in new window

0
 

Author Closing Comment

by:vbjohn
ID: 31600653
Thanks for the help.  We went a different route.  
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Prevent URL from printing on header 5 65
ASP Syntax for IF statement 21 58
how to hide hide popup page refresh second time? 10 110
replace quotes with UTF-8 character 38 83
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now