Link to home
Start Free TrialLog in
Avatar of ps_velan
ps_velan

asked on

XMLHTTP in VBA>>>

Hi..

I want to send the XML file as object to server(ASP) from Excel VBA..when I send xml file with size of 32K its working..I got response too..
but when I send the XML file as object with size of 2-5MB..I got the Error:

error : metod 'send' of  object 'IXMLHTTPREQUEST' failed


How TO I SEND the 2-5 MB xml file as object?

My Code in vba :
*******
'oxml.Load "c:\InputFinal.xml" ' 2.5 MB File
oxml.Load "c:\new.xml"        ' 89k file

'url = "XMLFILE=" & oxml.xml

With oXMLHttp
    .Open "POST", "http://localhost/projects/ASP Page2.asp", False
    .setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    .send oxml
End With

' Write the response from my server.
 MsgBox oXMLHttp.Status
 MsgBox oXMLHttp.statusText
 MsgBox oXMLHttp.responseText
 'MsgBox oXMLHttp.responseStream

IN ASP CODE :
**********
Dim objxml       
set objxml = server.createObject("MSXML2.DOMDocument")
      
strTemp = Request("XMLFILE")
objxml.load (strTemp)      
objxml.save ("c:\test.xml")      

thanks and regards
Thanigaivelan P S
ASKER CERTIFIED SOLUTION
Avatar of divt
divt

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial