?
Solved

Persits.Upload.1 error '800a0028'  Error in ASP Form

Posted on 2006-11-17
9
Medium Priority
?
3,147 Views
Last Modified: 2012-06-22
I have a form on a webpage on my site where people input information and upload pictures . The webpage is caled Ladiesapplication.asp.    When the Submit button was pushed the information would go into a Access database on the host server and the pictures would go into a file.  Recently I changed my hosting company from webhost4life to Godaddy and now when I  attempt to use the form I am getting the following error message:
(Note:  I have pasted the upload.asp)

c:\hosting\webhost4life\member\misnstt\uploaded\SMithJohn
Files:

Persits.Upload.1 error '800a0028'

This feature has been disabled by system administrator. Use File.SaveAsVirtual instead.

upload.asp, line 63
*********************************************************************************************

Thie Is The Upload.asp___________________________________________________________________
<%

Set Upload = Server.CreateObject("Persits.Upload")
upload.save
%>

<%
address = upload.form("address")
lastname = upload.form("lname")
firstname = upload.form("fname")
mmth = upload.form("mmth")
mday = upload.form("mday")
myr= upload.form("myr")
citytown = upload.form("citytown")
email = upload.form("email")
hphone = upload.form("hphone")
wphone = upload.form("wphone")
cphone = upload.form("cphone")
mlookage = upload.form("mlookage")
languages = upload.form("lanaguages")
religion = upload.form("religion")
mmar = upload.form("mmar")
mchild = upload.form("mchild")
profession = upload.form("profession")
mheight = upload.form("mheight")
mweight = upload.form("mweight")
measurments = upload.form("measurments")
hobbies = upload.form("hobbies")
notes = upload.form("notes")
details = upload.form("details")

Function CheckString(byval strText)
    strText = Replace(strText, "'", "''")
    If strText = "" Then
        CheckString = "Blank"
    Else
       CheckString = strText
    End if
End Function

function checkstring2(byval strtext)
      strtext = replace(strtext, "'","")
      checkstring2 = strtext
end function

%>

<%
foldername = checkstring2(lastname) + checkstring2(firstname)
filepath = "c:\hosting\webhost4life\member\misnstt\uploaded\" & foldername
response.write filepath & "<br>"
upload.createdirectory filepath, True
%>

Files:<BR>
<%
set conn = server.createobject("adodb.connection")
constr = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("\info.mdb")
conn.open constr

Set rs = Server.CreateObject("adodb.recordset")
For Each File in Upload.Files
file.saveas filepath & "\" & file.filename
fname = file.filename
response.write fname & "<br>"
sqlstr = "Insert into FileName(foldername, filename) Values('" & foldername & "', '" & fname & "')"
conn.execute(sqlstr)
Next

%><%
conn.close
set conn = nothing
set constr = nothing
%><%
set conn = server.createobject("adodb.connection")
constr = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("\info.mdb")
conn.open constr


valuestr = "values('" & foldername & "', '" & checkstring(lastname) & "','" & checkstring(firstname) & "', "
valuestr = valuestr & "'" & checkstring(mmth) & "','" & checkstring(mday) & "','" & checkstring(myr) & "','" & checkstring(address) & "'"
valuestr = valuestr & ",'" & checkstring(citytown) & "','" & checkstring(email) & "','" & checkstring(hphone) & "','" & checkstring(wphone) & "'"
valuestr = valuestr & ",'" & checkstring(cphone) & "','" & checkstring(mLookAge) & "','" & checkstring(languages) & "','" & checkstring(religion) & "'"
valuestr = valuestr & ",'" & checkstring(mMar) & "','" & checkstring(mChild) & "','" & checkstring(profession) & "','" & checkstring(mHeight) & "'"
valuestr = valuestr & ",'" & checkstring(mWeight) & "','" & checkstring(Measurments) & "','" & checkstring(Hobbies) & "','" & checkstring(Notes) & "','" & checkstring(Details) & "')"
sqlstr = "Insert into data(foldername, lname, fname, mMth, mDay, mYr, address, citytown, email, hphone, wphone, cphone, mLookAge,"
sqlstr = sqlstr & " languages, religion, mMar, mChild, profession, mHeight, mWeight, Measurments, Hobbies, Notes, Details)"
sqlstr = sqlstr & valuestr

conn.execute(sqlstr)

conn.close
set conn = nothing
set constr = nothing
%><%
response.redirect("thankyou.asp")
%>
0
Comment
Question by:cbomik
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
9 Comments
 
LVL 9

Expert Comment

by:blandyuk
ID: 17971157
You can use the:
Upload.SaveAsVirtual "[virtual-path]"

If you are storing files in say:
www.mydomain.com/files/
----------------
Upload.SaveAsVirtual "/files/"

and then simply use the File object to get the file names.
0
 

Author Comment

by:cbomik
ID: 17971363
Im sorry I am a novice at this.  I didnt develop that Upload.asp form I paid a person.  Could you tell me where I will put that path within the Upload.asp? And more or less how I would write it?
THanks
0
 
LVL 9

Expert Comment

by:blandyuk
ID: 17971608
Ah :) OK. The "Upload.Save" function saves the file data into memory, from there you can use the File object to save them off. This is what your script is currently doing. In order to change this, find the following code:

<%
Set Upload = Server.CreateObject("Persits.Upload")
upload.save
%>

and change it to:

<%
Set Upload = Server.CreateObject("Persits.Upload")
Upload.SaveAsVirtual "/files/"
%>

You'll need to create that directory in the root folder of the website, (root being the top level directory). This "should" save the files in there. You probably need to set Write permissions on that folder from IIS. Try it anyway, if you get "Access Denied" that you'll need to do that.

Very messy script that thou :( Can be done a lot better.
0
Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?

 
LVL 9

Expert Comment

by:blandyuk
ID: 17971612
Your website wouldn't be:

http://www.colombianbeautiesonline.com/

by any chance lol ;)

Google Search for: Ladiesapplication.asp
0
 

Author Comment

by:cbomik
ID: 17996321
Hello,
Yes that is me
I will set you up with all you want if you can figure this out for me.

I changed host companies because I thought that was the problem.

Now I am getting this:

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/upload.asp, line 3

800401f3
0
 
LVL 9

Expert Comment

by:blandyuk
ID: 18000057
Line 3 is:
-------------
Set Upload = Server.CreateObject("Persits.Upload")
-------------

Try this instead, it's normally how you call the Persits Upload object:

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

If you still get, "Server.CreateObject Failed", then it looks like there is something wrong with the object on the server as it should at least create the object.

I could have a look for you and see if I can provide a solution. I'll obviously need details with regards to gaining access etc. Obviously you would be entailing trust in me here but I am ok :)

Contact me via my contact page at:
http://www.blandyuk.co.uk/contact.asp
0
 
LVL 9

Accepted Solution

by:
blandyuk earned 2000 total points
ID: 18107782
Just to update everyone on this, I have re-coded the page and it now works :) His new provider used a different Upload object, simply a matter of changing the script it utilise it. Also had to get his provider to set "write" permissions on a particular folder.
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

771 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