473,327 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

How to fix " status 400 Invalid Request a" error while exporting data?

1,271 Expert 1GB
I'm trying to export data from Access to ASPDotNetStoreFront with XML. Can anyone tell me why I am getting a status 400 "Invalid Request" after the .send here in line 28?

I am using Access 2003.

Expand|Select|Wrap|Line Numbers
  1. Public Function GetNewGuid() As String
  2.  
  3.    On Error GoTo GetNewGuid_Error
  4.  
  5. Dim XMLsubmission As String
  6. Dim XMLReceived As String
  7. Dim HttpReq As New MSXML2.XMLHTTP30
  8. Dim myHTTP As MSXML2.XMLHTTP30  ' MSXML3.XMLHTTP
  9. Dim myDom As MSXML2.DOMDocument
  10. Dim XMLUrl As String   ' address for xml requests
  11. Dim x As String
  12.  
  13. Set myHTTP = CreateObject("MSXML2.XMLHTTP")
  14.  
  15. XMLUrl = "http://thehostserver.no-ip.info:4436/ipx.asmx"
  16.  
  17. myHTTP.Open "POST", XMLUrl, False
  18. x = myHTTP.Status
  19.  
  20. 'XMLsubmission = "<?xml version=""" & "1.0" & """ encoding=""" & "UTF-8" & """?>"
  21. XMLsubmission = ""
  22. XMLsubmission = XMLsubmission & XMLLogin() & vbNewLine  ' supplies id and password
  23. XMLsubmission = XMLsubmission & "<AspDotNetStorefrontImport Verbose=""" & "false" & """>" & vbNewLine
  24. XMLsubmission = XMLsubmission & "<GetGUID Count=""" & "1" & """/>"  ' just want to get a GUID from ASPDNSF
  25. XMLsubmission = XMLsubmission & "</AspDotNetStorefrontImport>"
  26.  
  27. myHTTP.send XMLsubmission
  28. x = myHTTP.Status  ' here x = "400" --- why?
  29.  
  30.     Dim bResult As Boolean
  31.     bResult = True
  32.     XMLReceived = myHTTP.responseXML.Text
  33.  
  34.     Do While bResult
  35.         bResult = ShowXMLResult(myHTTP)
  36.     Loop
  37. Set myHTTP = Nothing
  38.  
  39.  
  40.    On Error GoTo 0
  41.    Exit Function
  42.  
  43. GetNewGuid_Error:
  44.  
  45.     MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure GetNewGuid of Class Module cls_XML_Customer"
  46.     Resume Next
  47. End Function
  48.  
Thanks,
Jim
Jan 26 '11 #1
0 1069

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: josh dismukes | last post by:
/// here is the code i'm getting a parse error on the last line of the code which /// is </html> any help will be much appreciated. <?php session_start ();
8
by: shandain | last post by:
Ok, I have done this a million times, and I can't get this to work... I hope I am just being an idiot and missing something... but I can't see it... so please call me an idiot and tell me what it...
5
by: Codeman II | last post by:
Hi there, I am building a form where the user must upload a picture and fill in his details. Now I have a problem as all of this is on the same form. How will I be able to have the Browse...
0
by: Alvin Bruney | last post by:
When i submit a form from the client side using document.all.RateManForm.submit(); in the code behind, changing text in a text box or trying to prompt the user with a...
3
by: Xerxes | last post by:
Hi, I am trying to submit a form when a non-submit button is clicked! I have: <input name="add_dev" type="button" value="Add Device" onClick=" this.form.action='<?php echo $_SERVER?>';...
2
by: IchBin | last post by:
I am getting the error message below when ever I try to start my script on two different servers. I am not getting any errors off of my PC. I have looked around and found the answer a simple one. I...
2
by: deepaks85 | last post by:
Dear Friends, I have a small problem....but hope you guys can help me out...I am unable to submit data into my database. Here is the code...... filesubmit.htm <html> <head>
1
by: rwelchman | last post by:
Hi, I have a problem with a submit form in that it does not submit(error message), I think because there is another form on the page whose action is to work out various inputted variables and give...
6
by: samaelsh | last post by:
Hi all! My problem is this: I`ve got an ASP application with an object clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A element (this is DHTML tool for text editing). There is also a form in my...
2
by: Nelson Avena | last post by:
I've created ASP page that can delete specific row in my database but when i click the button it shows nothing... but i am sure that i put a correct syntax in my SQL code... Pls. Help me in this...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.