Forum Moderators: open

Message Too Old, No Replies

Microsoft VBScript runtime error '800a0005'

         

newcinc

3:01 am on Jun 27, 2003 (gmt 0)

10+ Year Member



Please help me

Microsoft VBScript runtime error '800a0005'

Invalid procedure call or argument

/newhardrockvn/admin/lib/inc_upload.asp, line 141

code:

If oFS.FileExists(sPath& FileName2) Then Exit Sub

Set oFile = oFS.CreateTextFile(sPath & fileName2, true)

For nIndex = 1 to LenB(FileData)
oFile.Write Chr(AscB(MidB(FileData,nIndex,1))) ' line 141
Next

Iguana

9:05 am on Jun 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is it because you have "sPath&" instead of "sPath &" in your if statement?

aspdaddy

11:44 am on Jun 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think its the argument not the procedure call thats invalid.

If you go one too many with nIndex, AscB throws that error.

Try this in the loop: (turn error handling on first)

If err.Number <> 0
Response.write nIndex &"<BR>"
Response.write Chr(AscB(MidB(FileData,nIndex,1)))
Response.End
end if