Author |
Topic |
|
carltsui
Starting Member
5 Posts |
Posted - 06 May 2002 : 02:02:32
|
Hello everyone, I met a problem about File Attachment MOD and Photo Gallery MOD, when I submit upload on POP_Upload.asp, it shown an error as below:
------------------------------------------------- Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument
/forum1/include/clsFile.inc, Line 89 -------------------------------------------------
I do know the problem come from this line:
objFile.Write Chr(AscB(MidB(m_vntBlob, lngCounter, 1))) ^^^
But how can I slove this problem? Thanks.
Carl Tsui
|
|
SalmanKhana
Average Member
USA
961 Posts |
Posted - 06 May 2002 : 02:16:34
|
i thought only i had the rights to ask coding help questions in 'community discussions' forum
hey just joking .. someone will be at ur help shortly.. i have no idea what that error is and the coding line looks very weird to me .
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 06 May 2002 : 05:17:59
|
do you have all the required WRITE & MODIFY permisions for the directory ?
|
|
|
carltsui
Starting Member
5 Posts |
Posted - 06 May 2002 : 06:01:10
|
quote:
do you have all the required WRITE & MODIFY permisions for the directory ?
Yes, if I remark this line ' objFile.Write Chr(AscB(MidB(m_vntBlob, lngCounter, 1))) then it could create a file on server, but file size = 0 And if I changed to this objFile.Write AscB(MidB(m_vntBlob, lngCounter, 1)) then file would upload success, why chr() can't work? it's weird...
Edited by - carltsui on 06 May 2002 06:19:41 |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 06 May 2002 : 07:32:31
|
this must be a limitation of the scripting engne installed on the server, do you know what version it is using ?
|
|
|
carltsui
Starting Member
5 Posts |
Posted - 06 May 2002 : 10:50:11
|
I ran my forum on Windows 2k server w/SP2, IIS 5, and some security updates from MS Site, I tried to put my forum both on English and Chinese version of w2k but they came the same problem, and I install a windows script 5.6 on my server, still won't work.
I tried to debug the whole steps when uploading, I found this error m came out abnormal, I modified clsfile.inc for testing like this: --------------------------- .... Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile(strPath & "\" & m_strFileName) dim xword For lngCounter = 1 To LenB(m_vntBlob) xword = xword & Chr(AscB(MidB(m_vntBlob, lngCounter, 1))) if (lngCounter mod 10240) = 0 then response.write ". " Next response.write xword objFile.Close ... ---------------------------
it ran OK, but when I changed it back like this: --------------------------- ..... For lngCounter = 1 To LenB(m_vntBlob) objFile.Write Chr(AscB(MidB(m_vntBlob, lngCounter, 1))) if (lngCounter mod 10240) = 0 then response.write ". " Next ..... --------------------------- it always got an error, sometimes happened at ngCounter=16 (I think it means 16th byte), sometimes it happened at ngCounter=38 (different upload file had different position that error occured). Is it helpful for you to understand my problem? Or what other information that I can offer you to slove that?
|
|
|
|
Topic |
|