Solved

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

Posted on 2006-11-17
9
3,138 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
Turn Insights into Action

Communication across every corner of your business is essential to increase the velocity of your application delivery and support pipeline. Automate, standardize, and contextualize your communication processes with xMatters.

 
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 500 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
The viewer will learn how to dynamically set the form action using jQuery.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

691 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