Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder
    Join Date
    May 2004
    Posts
    1,457
    Thanks
    15
    Thanked 0 Times in 0 Posts

    error creating files

    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?

  • #2
    Senior Coder BarrMan's Avatar
    Join Date
    Feb 2005
    Location
    Israel.
    Posts
    1,644
    Thanks
    69
    Thanked 83 Times in 82 Posts
    Well... what is line 90? can you post the whole code?

  • #3
    Senior Coder
    Join Date
    May 2004
    Posts
    1,457
    Thanks
    15
    Thanked 0 Times in 0 Posts
    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.

  • #4
    Senior Coder BarrMan's Avatar
    Join Date
    Feb 2005
    Location
    Israel.
    Posts
    1,644
    Thanks
    69
    Thanked 83 Times in 82 Posts
    Code:
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Code:
    Set objFSO = Server.CreateObject("Scripting.FileSystemObject")


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •