RoadRunnerOz
Programmer
I'm working a project to upload orders to a website.
Everything was fine while developing but when I attempted to
migrate my code to a form I got this error:
"OLE IDispatch exception code 0 from msxml3.dll. The parameter is incorrect."
and the weirdest thing is the .prg then gives me the same error until I restart VFP.
Clearing, closing, releasing etc does nothing
*-- Works as a prg but not in a method?????
USE sysfile
oHTTP = CreateObject("MSXML2.XMLHTTP")
lcUsername = ALLTRIM(sysfile.User)
lcPassword = ALLTRIM(sysfile.Pass)
lcFile = FILETOSTR("C:\Windows\Temp\x_3MA16S8GZ.XML")
lcUrl = "oHTTP.Open("POST", m.lcURL , .F., m.lcUsername, m.lcPassword)
oHTTP.setRequestHeader("Content-Type", "text/xml")
oHTTP.Send(m.lcFile) && <---- here I get the error
IF "error" $ oHTTP.responseText
=MESSAGEBOX(oHTTP.responseText)
ENDIF
And yes the temporary XML file is the same.
I originally had oHTTP as a property on the form and got the same results.
Retrieving data off the same server in different form is not an issue
oHTTP = CREATEOBJECT('MSXML2.XMLHTTP')
lcUrl = "oHTTP.OPEN("GET", m.lcUrl , .F., m.lcUsername, m.lcPassword) && YES
oHTTP.SEND("")
Thanks in advance
TheYankDownUnder
Michael Ouellette
Everything was fine while developing but when I attempted to
migrate my code to a form I got this error:
"OLE IDispatch exception code 0 from msxml3.dll. The parameter is incorrect."
and the weirdest thing is the .prg then gives me the same error until I restart VFP.
Clearing, closing, releasing etc does nothing
*-- Works as a prg but not in a method?????
USE sysfile
oHTTP = CreateObject("MSXML2.XMLHTTP")
lcUsername = ALLTRIM(sysfile.User)
lcPassword = ALLTRIM(sysfile.Pass)
lcFile = FILETOSTR("C:\Windows\Temp\x_3MA16S8GZ.XML")
lcUrl = "oHTTP.Open("POST", m.lcURL , .F., m.lcUsername, m.lcPassword)
oHTTP.setRequestHeader("Content-Type", "text/xml")
oHTTP.Send(m.lcFile) && <---- here I get the error
IF "error" $ oHTTP.responseText
=MESSAGEBOX(oHTTP.responseText)
ENDIF
And yes the temporary XML file is the same.
I originally had oHTTP as a property on the form and got the same results.
Retrieving data off the same server in different form is not an issue
oHTTP = CREATEOBJECT('MSXML2.XMLHTTP')
lcUrl = "oHTTP.OPEN("GET", m.lcUrl , .F., m.lcUsername, m.lcPassword) && YES
oHTTP.SEND("")
Thanks in advance
TheYankDownUnder
Michael Ouellette