Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Other Development Tools
 XML Post not working

Author  Topic 

ninel
Posting Yak Master

141 Posts

Posted - 2006-09-06 : 19:22:44
I am using the following code:
I create the xml and then call the xmlpost function.

I am getting an error on the .send “The download of the specified resource has failed”


Private Function xmlPost(ByVal sURL As String, ByVal sRequest As String, ByVal iTimeOut As Integer, ByRef sResponse As String) As Boolean

Dim sSource As String
Dim iCount As Integer
Dim objXMLPost As MSXML2.XMLHTTP40
Dim iLTimeOut As Long

xmlPost = False

Set objXMLPost = New MSXML2.XMLHTTP40

iLTimeOut = iTimeOut
iLTimeOut = 1000 * iLTimeOut

objXMLPost.Open "POST", sURL, False
objXMLPost.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"

objXMLPost.send sRequest
sResponse = objXMLPost.responseText

xmlPost = True
Set objXMLPost = Nothing

Exit Function
End Function


Does anyone have any idea?
Thanks,
Ninel
   

- Advertisement -