Forum Discussion
AlexKaras
13 years agoChampion Level 3
Hi Praveen,
> Above one works for me and inserted into DB. [...] Getting the error message as An Item with the same key has already added.
I think that this means that you are trying to insert another record into DB that violates some constraint. You should either delete the record inserted previously, or change some data to meet constraint requirements.
> Can you please provide the how i can get the Result values.
The usual code for the XmlHttpRequest.send() approach is like this:
> Above one works for me and inserted into DB. [...] Getting the error message as An Item with the same key has already added.
I think that this means that you are trying to insert another record into DB that violates some constraint. You should either delete the record inserted previously, or change some data to meet constraint requirements.
> Can you please provide the how i can get the Result values.
The usual code for the XmlHttpRequest.send() approach is like this:
Call XmlHttpRequest.open("POST", "https://...", False)
Call XmlHttpRequest.send(RequestXml)
If (200 <> XmlHttpRequest.status) Then
Call Log.Warning("Problems while sending request to " & vbCrLf & _
"https://..." & vbCrLf & _
"HTTP response status: " & IntToStr(XmlHttpRequest.status) & vbCrLf & XmlHttpRequest.statusText, _
XmlHttpRequest.responseXML.xml)
End If
Call Log.Message("Server response", XmlHttpRequest.responseXML.xml) ' or XmlHttpRequest.responseText
I hope the code like the above should work for you (just put the breakpoint on the 'If (200 <> XmlHttpRequest.status) Then' line and examine the XmlHttpRequest object in the TestComplete Inspector window).
Related Content
Recent Discussions
- 3 years ago
- 3 years ago
- 4 years ago