Forums

This topic is locked

Pure ASP Upload Problem...Please Help!!!

Posted 20 Feb 2003 17:19:01
1
has voted
20 Feb 2003 17:19:01 Katherine Williams posted:
Hello, and thanks in advance for any help,

I purchased the Pure ASP Upload 2.09 Bundle Pack recently, and it works great. Buta feature from the Add-On pack is not working for me at all. It's the "Rename Uploaded Files" SB. When I attempt to add that SB to the page, the page gives the following error:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>Microsoft VBScript runtime error '800a01a8'

Object required: 'UploadRequest'

/Employment/ScriptLibrary/incPUAddOn.asp, line 110<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

I have no idea what the problem is, as the page worked fine with the Pure ASP Upload before I added the "Rename Uploaded Files" SB. Can anyone please help me to figure out what's going on here? Thanks.

KWilliams

Replies

Replied 11 Mar 2003 17:09:44
11 Mar 2003 17:09:44 Katherine Williams replied:
Ok, thanks Patrick. I appreciate you responding so quickly.

KWilliams
Replied 12 Mar 2003 11:13:46
12 Mar 2003 11:13:46 Patrick Woldberg replied:
I think we found the solution,

in the incPUAddOn.asp change the following:

Find:
<b>Dim REUF_fso, REUF_curPath, REUF_curName, REUF_curExt, REUF_newFileName</b>

Change it in:
<b>Dim REUF_fso, REUF_curPath, REUF_curName, REUF_curExt, REUF_newFileName, REUF_fileNameOnly</b>

Find:
<b>REUF_fileName = UploadRequest.Item(REUF_curKey).Item("FileName"</b>

Change it in:
<b>REUF_fileName = UploadRequest.Item(REUF_curKey).Item("Value"</b>

Find:
<b>else
REUF_curName = REUF_fileName
end if</b>

Under this enter:
<b>REUF_fileNameOnly = REUF_curName</b>

Find:
<b>if REUF_fso.FileExists(Server.MapPath(REUF_curPath & REUF_fileName)) then
REUF_fso.MoveFile Server.MapPath(REUF_curPath & REUF_fileName), Server.MapPath(REUF_curPath & REUF_newFileName)
end if</b>

Change it in:

<b>if REUF_fso.FileExists(Server.MapPath(REUF_curPath & REUF_fileNameOnly)) then
REUF_fso.MoveFile Server.MapPath(REUF_curPath & REUF_fileNameOnly), Server.MapPath(REUF_curPath & REUF_newFileName)
end if</b>


Also in your own document be sure that you have changed the <b>"unknown"</b> into <b>"undefined"</b>.

--------------------------------------------------
Patrick Woldberg
Web Developer at Dynamic Zones
Manager at DMXzone.com
--------------------------------------------------
Replied 12 Mar 2003 16:12:26
12 Mar 2003 16:12:26 Katherine Williams replied:
Hi Patrick,

I just made your suggested changes to the Add On Include file, and this is what I get:

When I don't specify a path in the Rename SB, as it says to do when you've already specified to save the entire path on the Pure ASP Upload, it gives me this error message:

Server.MapPath() error 'ASP 0171 : 80004005'

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote> Missing Path

/Employment/ScriptLibrary/incPUAddOn.asp, line 133

The Path parameter must be specified for the MapPath method.<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

When I do specify a path in the Rename SB, it gives me this error message:

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>Microsoft OLE DB Provider for SQL Server error '80040e14'

Line 1: Incorrect syntax near '.'.

/Employment/app5.asp, line 142<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

This is the code from the "app5.asp" page it's referencing (execute statement for update):

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>if (!MM_abortEdit) {
// execute the update
var MM_editCmd = Server.CreateObject('ADODB.Command');
MM_editCmd.ActiveConnection = MM_editConnection;
MM_editCmd.CommandText = MM_editQuery;
MM_editCmd.Execute(); &lt;&lt;&lt;&lt;&lt;----------------------------------LINE 142
MM_editCmd.ActiveConnection.Close();<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

So I think we're making progress, but I'm still getting weird error messages. I did make sure that "unknown" was still changed to "undefined" in the Rename SB. What do you think?

KWilliams
Replied 12 Mar 2003 16:41:32
12 Mar 2003 16:41:32 Katherine Williams replied:
Patrick,

I fixed that error by adding a '.' before the ##ext## on the Add On include file on Line 132. Then it gave me an error saying that "myFile_" is not a valid column name. So I changed that to App_ID. Now it's giving me this error message:

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>Microsoft OLE DB Provider for SQL Server error '80040e07'

Syntax error converting the varchar value 'TEST ' to a column of data type int.

/Employment/app5.asp, line 142<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

For app5.asp, Line 142, it's referencing this Rename SB code:

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>&lt;%
// *** Rename Uploaded Files 1.6.0
if (String(Request.QueryString("GP_upload") != "undefined" {
var REUF_path = "Resumes"
var REUF_renameMask = "App_ID##name##.##ext##" &lt;&lt;&lt;-----LINE 142
RenameUploadedFiles(REUF_path,REUF_renameMask);
}
%&gt;<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

I don't understand why I'm getting this message. The only "TEST" on either of the pages is on the app5.asp page under the Pure ASP Upload SB code. What do you think?

KWilliams
Replied 12 Mar 2003 18:07:41
12 Mar 2003 18:07:41 Patrick Woldberg replied:
I have send you by e-mail the new version that will be released somewhere next week, it should fix the problems you have.

--------------------------------------------------
Patrick Woldberg
Web Developer at Dynamic Zones
Manager at DMXzone.com
--------------------------------------------------
Replied 12 Mar 2003 18:40:31
12 Mar 2003 18:40:31 Katherine Williams replied:
Patrick,

I uninstalled the old Add-On Pack version, and installed the new version you sent to me. I was able to get it to rename and save the resume into the proper folder, but it's not saving the path into the DB at all. It's giving me this error message:

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>Server.MapPath() error 'ASP 0173 : 80004005'

Invalid Path Character

/Employment/ScriptLibrary/incPUAddOn.asp, line 153

An invalid character was specified in the Path parameter for the MapPath method.<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Line 153 on the inclPUAddOn.asp page is bolded below:

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
<b>if REUF_fso.FileExists(Server.MapPath(REUF_curPath & REUF_fileNameOnly</b>
then
REUF_fso.MoveFile Server.MapPath(REUF_curPath & REUF_fileNameOnly), Server.MapPath(REUF_curPath & REUF_newFileName)
end if
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Also, I need this Rename SB to use the App_ID as the renameMask, and I was able to accomplish this task using this code below:

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote> var REUF_renameMask = Session("App_ID"+".##ext##"<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

But it's adding a bunch of spaces after the filename for some reason. I've tried adding a semicolon after the "##.ext##" code, but it didn't fix it.

What do you think?

KWilliams
Replied 13 Mar 2003 10:25:26
13 Mar 2003 10:25:26 Patrick Woldberg replied:
Can you send me your asp file so I can take a look at your code?

--------------------------------------------------
Patrick Woldberg
Web Developer at Dynamic Zones
Manager at DMXzone.com
--------------------------------------------------
Replied 13 Mar 2003 15:57:05
13 Mar 2003 15:57:05 Katherine Williams replied:
HALLELUJAH!!!!! IT WORKS<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle><img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle> I'm so happy. Thanks for all of your help Patrick. It now saves & renames the file into the correct folder, and saves the correct path into the DB.

It still has 91 spaces between the new filename and the ext. This is the code I'm using:

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>&lt;%
// *** Rename Uploaded Files 1.7.0
if (String(Request.QueryString("GP_upload") != "undefined" {
var REUF_path = ""
var REUF_nameConflict = "over"
var REUF_renameMask = Session("App_ID"+".##ext##" &lt;&lt;----Line w/spaces
RenameUploadedFiles(REUF_path,REUF_nameConflict,REUF_renameMask);
}
%&gt;<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Do you see what I need to change or correct to not get 91 spaces between the filename "App_ID" and the extension? I've looked at the FAQ from George at www.dmxzone.com/showDetail.asp?TypeId=7&NewsId=3403 on dynamically renaming a file, but none of his options actually worked for me.

Patrick, thanks for all of your help!! I REALLY appreciate it.

KWilliams
Replied 13 Mar 2003 17:02:35
13 Mar 2003 17:02:35 Patrick Woldberg replied:
The spaces must be in the Session("App_ID", check what the App_ID exactly contains. You can do an trim on the App_Id.

--------------------------------------------------
Patrick Woldberg
Web Developer at Dynamic Zones
Manager at DMXzone.com
--------------------------------------------------
Replied 13 Mar 2003 17:09:07
13 Mar 2003 17:09:07 Katherine Williams replied:
Hey Patrick,

YOU ARE THE BOMB!!! You were ofcourse correct. Thanks for all of your help. DMXZone is very lucky to have you!! I know this has been an exhausting process, but you've been patient and thorough along the entire journey. Have a great weekend and thanks again!

Your new fan,

KWilliams

Reply to this topic