Re: MySQL HTTP XML ODBC

From: John (no_at_email)
Date: 05/05/04


Date: Wed, 05 May 2004 10:42:12 +0100

Donny wrote:
> Does anyone know of anything that will allow the following...
>
> Web hosting providers normally supply a MySQL database as part of the
> service. You can access your database by connecting to a MySQL server
> via localhost. This server is usually inaccessible from external
> hosts.
> I would like to be able to access such a database from a remote
> machine using the Web server as a kind of proxy.
>
> This is how I imagine it might work:
> * a servlet or similar (maybe a PHP or Perl script) accepts HTTP POSTs
> containing XML that explains what to retrieve/store/execute in the
> database. It returns with a reponse containing some more XML
> containing the results/statuses/rows etc
>
> * a custom ODBC driver would be created to process SQL and talk to our
> web server using the XML messaging we have defined. It would likely
> need to POST multiple times to complete a query.
>
> The ODBC could then be used by almost anything.
>
> Is there anything like this?
> Otherwise I would like to develop something, but the ODBC driver is
> going to be a big problem.
>
> It would need to work using a basic web server setup with serverside
> scripting.
>
> Can anyone think of tricky bits that I may not have considered or a
> better way of doing this?
>
> -Donny

This is fairly straightforward. Write a simple PHP page that takes a
query, username and password as attributes and displays a table of some
sort.

(assuming use of java) write a class that accesses the web page,
processes the tables to arrays and returns a resultset.

I personally think that writing an ODBC driver is a waste of time for
something that your ISP could fix by being more helpful. The above is a
quick and cheap workaround however.

John

ps. I wouldn't bother with XML personally.



Relevant Pages