0

The ASP code getting the below error while writing text to file.

Microsoft VBScript runtime error '800a0005'

Invalid Procedure call or argument

The Line in which i get the above error is below,

oFile.Write Chr(AscB(MidB(FileData,nIndex,1)))

The issue is caused when I am uploading a file. I will face this error only in Development environment. But the same code is working good in the Production environment. I could not understand why the error causes in Dev environment only.

Filburt
  • 16,221
  • 12
  • 59
  • 107
Sarath Kumar
  • 1
  • 1
  • 2

1 Answers1

0

You have a method with three nested function calls. Try breaking that up to see which call actually causes the error:

b = MidB(FileData, nIndex, 1)
i = AscB(b)
c = Chr(i)
oFile.Write c
Ansgar Wiechers
  • 175,025
  • 22
  • 204
  • 278