Passing parameters from url to desktop app

What would be the simplest way to pass parameters from an online database to a desktop app? The parameters would be established in the URL of the web based database and it would be used to fill out numerous text fields in the desktop app.

Would there be a better way of doing this?

What would the steps be?

Hhmm…normally you don’t get a URL back from querying an online database. It’s also not advisable to have a direct connection to the database from your app.

You have a middleware app (this can be a web app) sitting on the server that can receive Get and Post request sent to a URL and then the middleware app parses the request, queries the database, and then packages the data up and returns an XML or JSON string. Your desktop app then parses the return and figures out what to do with the data.

Well, the number of characters in a URL is limited 250 so it’s of very limited usefulness.

Looking at the Caspio database documentation (http://howto.caspio.com/caspio-bridge-rest-api/), it looks like you use the parameters in the URL you send to their middleware which in turn queries their database. This is where the query parameters go. What it returns is an XML or JSON string contained in the HTTP response.

So it’s not returning a URL for you to look at, it’s returning a string. You would using an HTTPSocket to Get or Post to the database. The return of that get/post would have your data. Then it’s up to you to parse it and put it in your user interface.

I’m probably not explaining it very well but I hope that helps.

[quote=177477:@Bob Keeney]Well, the number of characters in a URL is limited 250 so it’s of very limited usefulness.

Looking at the Caspio database documentation (http://howto.caspio.com/caspio-bridge-rest-api/), it looks like you use the parameters in the URL you send to their middleware which in turn queries their database. This is where the query parameters go. What it returns is an XML or JSON string contained in the HTTP response.

So it’s not returning a URL for you to look at, it’s returning a string. You would using an HTTPSocket to Get or Post to the database. The return of that get/post would have your data. Then it’s up to you to parse it and put it in your user interface.

I’m probably not explaining it very well but I hope that helps.[/quote]

Actually, that helped more than you know! I can make the user download a XML which can be opened in my program. The issue now is opening an XML.

Currently, I have

[code] Dim dlg As OpenDialog
Dim f As FolderItem
dlg = New OpenDialog

dlg.InitialDirectory = SpecialFolder.Desktop

dlg.title = “Select a file from ________________ to upload” // Text removed for security reasons

dim Type as FileType

Type.Extensions = “xml;.xml”

dlg.filter = Type.Extensions

[/code]
But there is an issue in the extensions or how I am calling it. From here, it is making it “understand” the xml I presume.

You might want to look at adding a FileType object to the project so the UTI is correct.