ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old April 19th, 2008, 12:26 AM
Adonius Adonius is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 10 Adonius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 19 m 9 sec
Reputation Power: 0
Cool Other - Asp Problem Upload

I get the following problem with an upload script that i received online:

Microsoft VBScript runtime error '800a01f4'

Variable is undefined: 'USERNAME'

/upload.asp, line 7




Here is the whole script:

<%@ Language="VBScript" %>
<% Option Explicit %>
<!--#INCLUDE FILE="INC_CONFIG.ASP"-->
<!--#INCLUDE FILE="DBCONN.ASP"-->
<!--#INCLUDE FILE="INC_LNG.ASP"-->
<%DIM SHOW
USERNAME = REQUEST.COOKIES(USERMANSITENAME&"USER")
SET SHOW=SERVER.CREATEOBJECT("ADODB.RECORDSET")
SHOW.OPEN "SELECT PICTURE,ISPICTURE FROM USERS WHERE USERNAME = '"&USERNAME&"'", DBCONN, 3, 3%>
<HTML>
<HEAD>
<TITLE>UNLIMITED</TITLE>
<STYLE>
BODY
{
SCROLLBAR-HIGHLIGHT-COLOR:#D8C2AD;
SCROLLBAR-TRACK-COLOR:#FAFCED;
SCROLLBAR-SHADOW-COLOR:#000000;
SCROLLBAR-FACE-COLOR:#D8C2AD;
SCROLLBAR-3DLIGHT-COLOR:#000000;
SCROLLBAR-ARROW-COLOR:#FFFDDD;
SCROLLBAR-DARKSHADOW-COLOR:#000000;
}


.FONT
{
COLOR: #000080; Helvetica
}

A
{
COLOR: #0011CC;
}

A:HOVER
{
COLOR: #0000FF
}

A:VISITED
{
COLOR: #2D3DAD
}

A:VISITED:HOVER
{
COLOR: #0000FF
}

.INPUT
{
COLOR: 000080;
FONT: 10px Helvetica;
BACKGROUND-COLOR: AA89C2;
BORDER-RIGHT: 1px solid;
BORDER-LEFT: 1px solid;
BORDER-TOP: 1px solid;
BORDER-BOTTOM: 1px solid

}



</STYLE>
</HEAD>

<BODY BGCOLOR="#CCBBAA" TOPMARGIN="0" LEFTMARGIN="0">


<%
UPS = REQUEST.QUERYSTRING("UP")%>
<%IF UPS = "UP" THEN
SET PIC_UPLOAD = SERVER.CREATEOBJECT("aspSmartUpload.SmartUpload")
PIC_UPLOAD.UPLOAD
For each file In PIC_UPLOAD.Files
IF NOT FILE.IsMissing Then
IF File.Size > 153000 THEN
RESPONSE.WRITE "<CENTER><H2 CLASS=""FONT"">"&UMP_MSG_ANERROROCCURED&"</H2><FONT SIZE=""2"" CLASS=""FONT"">"&UMP_MSG_UPLOADFILESIZE&"<BR><A HREF=""javascript:history.back()"">"&UMP_MSG_GOBACK&"</A></FONT></CENTER>"
ELSEIF FILE.FileExt <> "jpg" THEN
RESPONSE.WRITE "<CENTER><H2 CLASS=""FONT"">"&UMP_MSG_ANERROROCCURED&"</H2><FONT SIZE=""2"" CLASS=""FONT"">"&UMP_MSG_FILEEXT&"<BR><A HREF=""javascript:history.back()"">"&UMP_MSG_GOBACK&"</A></FONT></CENTER>"
ELSE
File.SaveAs(USERMANUPLOADPATH & USERNAME&"."&File.FileExt)
SHOW.UPDATE
SHOW("PICTURE") = USERNAME&"."&File.FileExt
SHOW("ISPICTURE") = "True"
SHOW.UPDATE
RESPONSE.REDIRECT("UPLOAD.ASP?UP=TRUE")
END IF
ELSE
RESPONSE.WRITE "<CENTER><H2 CLASS=""FONT"">"&UMP_MSG_ANERROROCCURED&"</H2><FONT SIZE=""2"" CLASS=""FONT"">"&UMP_MSG_NOTSELECTFILE&"<BR><A HREF=""javascript:history.back()"">"&UMP_MSG_GOBACK&"</A></FONT></CENTER>"
End IF
NEXT
%>
<%ELSEIF UPS = "TRUE" THEN%>
<CENTER><FONT SIZE="2" CLASS="FONT"><%=UMP_MSG_UPLOADPICSUCESS%><BR><IMG SRC="<%=USERMANUPLOADPATH%><%=SHOW("PICTURE")%>"><BR><A HREF="javascript:window.close()"><%=UMP_MSG_WINCLOSE%></A></FONT></CENTER>
<%ELSE%>
<center>
<H2 CLASS="FONT"><%=UMP_UploadYourPicture%> </H2><FONT SIZE="2" CLASS="FONT"><%=UMP_MSG_PICWARN%>
<FORM ACTION="UPLOAD.ASP?UP=UP" METHOD="POST" ENCTYPE="multipart/form-data">
<INPUT TYPE="FILE" NAME="FILE" CLASS="INPUT" SIZE="45">
<INPUT TYPE="SUBMIT" VALUE="<%=UMP_UploadYourPicture%>" CLASS="INPUT"></form>
<A HREF="javascript:window.close()"><%=UMP_MSG_WINCLOSE%></A>
</CENTER>
<%END IF%>




Please help me
need this file to work for a school project!

Reply With Quote
  #2  
Old April 19th, 2008, 02:57 AM
micky's Avatar
micky micky is offline
Couch Potato Wizard
Click here for more information. Click here for more information
 
Join Date: Jan 2005
Location: India
Posts: 10,252 micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)  Folding Points: 1480 Folding Title: Novice Folder
Time spent in forums: 3 Months 3 Weeks 3 Days 35 m 47 sec
Reputation Power: 1439
hi and welcome to the forum
as the error says, u need to define the variable USERNAME

u have this line in ur code <% Option Explicit %>, because of which u need to define all ur variables.
So just define it and the error will go

Also please use code tags while posting code here, select code and press #
Comments on this post
Adonius agrees: GOod answer
__________________
Laziness is my religion and Sunday is my God

Get the Mantra!

Reply With Quote
  #3  
Old April 19th, 2008, 06:59 AM
Adonius Adonius is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 10 Adonius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 19 m 9 sec
Reputation Power: 0
Many thanks

Thank you!

Is there any chance we can keep in contact
because I want to finish my school project ASAP and i have some problem with CODING

ANd i will want someone to pin point my problems
Code:
Thank you!

Quote:
Originally Posted by micky
hi and welcome to the forum
as the error says, u need to define the variable USERNAME

u have this line in ur code <% Option Explicit %>, because of which u need to define all ur variables.
So just define it and the error will go

Also please use code tags while posting code here, select code and press #

Reply With Quote
  #4  
Old April 19th, 2008, 07:14 AM
Adonius Adonius is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 10 Adonius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 19 m 9 sec
Reputation Power: 0
Help Needed

CAn someone be at my disposel for 1 day or some hours to help me pin point some coding problem in my school project site!!

Regards,
Adonius

Reply With Quote
  #5  
Old April 19th, 2008, 07:17 AM
micky's Avatar
micky micky is offline
Couch Potato Wizard
Click here for more information. Click here for more information
 
Join Date: Jan 2005
Location: India
Posts: 10,252 micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)  Folding Points: 1480 Folding Title: Novice Folder
Time spent in forums: 3 Months 3 Weeks 3 Days 35 m 47 sec
Reputation Power: 1439
u can ask here only!!

Reply With Quote
  #6  
Old April 19th, 2008, 07:22 AM
Adonius Adonius is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 10 Adonius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 19 m 9 sec
Reputation Power: 0
ok then!
At which hour can i get you so we can brainstorm
I`m leaving here to go GYM
i`ll be back in about 3 a 4 hour maybe less

Reply With Quote
  #7  
Old April 19th, 2008, 07:24 AM
Adonius Adonius is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 10 Adonius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 19 m 9 sec
Reputation Power: 0
I`ll just post an reply when i`m back

Your a miracle i need a good help here so i can finish this school project i`m nealy finished here but i need to upload pics and more on it

Reply With Quote
  #8  
Old April 19th, 2008, 09:47 AM
Adonius Adonius is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 10 Adonius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 19 m 9 sec
Reputation Power: 0
Mickey

I`m back ready to start coding!

Reply With Quote
  #9  
Old April 19th, 2008, 09:59 AM
Adonius Adonius is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 10 Adonius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 19 m 9 sec
Reputation Power: 0
Defined variable

Have defined variable But still problem

Code:
Server object error 'ASP 0177 : 800401f3' 

Reply With Quote
  #10  
Old April 21st, 2008, 01:52 AM
micky's Avatar
micky micky is offline
Couch Potato Wizard
Click here for more information. Click here for more information
 
Join Date: Jan 2005
Location: India
Posts: 10,252 micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)micky User rank is General 7th Grade (Above 100000 Reputation Level)  Folding Points: 1480 Folding Title: Novice Folder
Time spent in forums: 3 Months 3 Weeks 3 Days 35 m 47 sec
Reputation Power: 1439
Quote:
Originally Posted by Adonius
Have defined variable But still problem

Code:
Server object error 'ASP 0177 : 800401f3' 
u need to tell us the line of the error

Reply With Quote
  #11  
Old April 21st, 2008, 08:13 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information.
 
Join Date: Sep 2004
Location: Israel
Posts: 26,694 Shadow Wizard User rank is General 7th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 7th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 7th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 7th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 7th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 7th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 7th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 7th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 7th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 7th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 7th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 7th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 7th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 7th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 7th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 7th Grade (Above 100000 Reputation Level)  Folding Points: 331013 Folding Title: Super Ultimate Folder - Level 1Folding Points: 331013 Folding Title: Super Ultimate Folder - Level 1Folding Points: 331013 Folding Title: Super Ultimate Folder - Level 1Folding Points: 331013 Folding Title: Super Ultimate Folder - Level 1Folding Points: 331013 Folding Title: Super Ultimate Folder - Level 1Folding Points: 331013 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 1 Week 4 Days 19 h 36 m 21 sec
Reputation Power: 1483
--thread moved to the classic ASP forum.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > Other - Asp Problem Upload


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |