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,466
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Microsoft VBScript runtime error '800a0005'

    Microsoft VBScript runtime error '800a0005'

    Invalid procedure call or argument

    /admin.asp, line 167

    I am getting this error when trying to MyFile.writeline strLine when the actual value of strline is in hebrew. (it works in english.)

    below is the actual code. I did declare my session.codepage=1255

    This only happens when there is hebrew in the database -- not english.

    Please help me debug

    Code:
    sub outputexcel(sql)
    	'response.write sql
    	randomize
         nRandom = (100-1)*Rnd+1
         fileExcel =monthname(month(date)) &  cstr(year(date)) & "_" & CStr(nRandom) & ".xls"
         filePath= Server.mapPath("admin.asp")
    	 filepath=mid(filepath,1,len(filepath)-9)
    	 'response.write "filepath:" & filepath & "<br>"
    	  filename=filePath & "excelfiles\" & fileExcel
         'response.write filename
    	 Set fs = Server.CreateObject("Scripting.FileSystemObject")
         Set MyFile = fs.CreateTextFile(filename, True)
    
          Set rs = objconn.Execute(sql)
    
         strLine="<table><tr>" 'Initialize the variable for storing the filednames
    
         For each x in rs.fields
                 strLine= strLine & "<td>" & x.name & "</td>"
         Next
    	 	strline=strline&"</tr>"
           MyFile.writeline strLine
    
            Do while Not rs.EOF
         strLine="<tr>"
         for each x in rs.Fields
    	  	cell=x.value
    		strLine= strLine & "<td>" & cell & "</td>"
         next
    	 	strline=strline & "</tr>"
         MyFile.writeline strLine
         rs.MoveNext
      Loop
    	myfile.writeline "</table>"
        MyFile.Close
      Set MyFile=Nothing
      Set fs=Nothing
    
      link="<A HREF=excelfiles/" & fileExcel & " class=adminmenu target=_new>Click Here to Open Excel</a> or right click to save target file"
       Response.write "<br>Excel File Created<br><br>" &  link
    
    
    end sub

  • #2
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,072
    Thanks
    4
    Thanked 8 Times in 8 Posts
    Is it possible that the Hebrew characterset is not loaded on the server?
    Last edited by miranda; 02-16-2005 at 07:21 PM.

  • #3
    Senior Coder
    Join Date
    May 2004
    Posts
    1,466
    Thanks
    15
    Thanked 0 Times in 0 Posts
    no I am creating a file --- any other ideas on what could be causing this?

  • #4
    Regular Coder
    Join Date
    Oct 2004
    Location
    In front of this computer. (Where else?)
    Posts
    442
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Have you tried running it on your machine and testing while making sure you have the hebrew character set installed on your machine?
    Tomorrow is the first day of the rest of your life... What have you done today?
    Tutorials
    Web: w3schools, htmldog General tips: Hardware, Networking


  •  

    Posting Permissions

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