View Full Version : error creating files

03-02-2006, 10:48 AM
i'm creating a asp file dynamically reading an excel table.
For some reason some fields in the excel table (which i see nothing diffrent about and I have no idea why)
are createing an error

Microsoft VBScript runtime error '800a0005'

Invalid procedure call or argument

/newsite/createcountrypagefile.asp, line 90

when i try to write that line --

any idea why?

03-02-2006, 01:07 PM
Well... what is line 90? can you post the whole code?

03-02-2006, 01:19 PM
objfile.writeline rs(0)

i'm openging the file like this

Dim objFSO, objTextFile

' Create an instance of the the File System Object and assign it to objFSO.
Set objFSO = CreateObject("Scripting.FileSystemObject")

Set objTextFile = objFSO.CreateTextFile(Server.MapPath("test.asp"))

it works for most of the rows of the excel but for no apparent reason is not working on specific rows... and it's just text that's it's erroring on writing - it's very strange. any suggestions on how to debug why it's happening??

I tried converting the excel to access and running the same code reading from access and writing to the file but I got the same error.

03-05-2006, 04:50 PM
Set objFSO = CreateObject("Scripting.FileSystemObject")

Set objFSO = Server.CreateObject("Scripting.FileSystemObject")