The post does nothing.
The server logs shows both the GET and POST, but row not added to DB.
Is there something I need to do in the web or DT app to get Xojo post to work?
Thanks.
Read the docs about App.HandleSpecialUrl. Do not understand any of it. However I added the code to my app. Was not sure about the code for the button, so I added it to the ‘Submit’ button; which is used to show errors or update the data base if no errors with a ok message. Did not show my error message, just showed the message from the coded added.
It sounds like you are trying to directly call a page on a Xojo web app from a desktop app. You cannot do that.
You can have a web app accept HTTP post requests (using WebApplication.HandleSpecialURL) and then process the request as necessary (updating the DB it sounds like).
It sounds to me like you need to split out the code in the web app that is updating the DB to its own method that connects to the DB and updates it. On the web page in your web app, you’d get the necessary info from the page fields and call the method to update the DB. For desktop requests, you would put code in the WebApplication.HandleSpecialURL to get the necessary info supplied in the WebRequest and call the method to update the DB.
There are two examples included with Xojo that show you how WebApplication.HandleSpecialURL works. The easiest one to check out is the one here: Web/QuoteService-SpecialURL
The more advanced one is: Communication/Internet/TwilioAnswerCall
[quote=26764:@James A Smith]Paul: To make sure; are you saying: that a Xojo desktop app can NOT link using a SOCKET, via the internet, to a Xojo web application with a POST?
[/quote]
He’s not saying that. I think you’re talking at different levels. A WE app is basically a web server. When you connect to its “home page”, you get all the GUI and Session stuff that WE apps primarily deliver. WE apps can also serve up “special” URLs that mimic a more traditional web serving experience. For your particular problem, you could implement one of these in a WE app to do what you need it to do. POST or GET for passing script data both work fine.