Question concerning accessing external database.

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

Question concerning accessing external database.

Postby Lawtonfogle » Thu Apr 23, 2009 4:37 am

If there is a tutorial on how to do this, please just link it. I have spent some time looking over both this site and Google and have not found a single tutorial.

Anyways, I have the url of a server which host a database, the layout of that database with the names of tables and what the tables have in them, and the userID/password for the server. How do I connect to the server (though the emulator, if it makes a difference) and access the database so I can query it?

I'm not asking for code, just pointers to tutorials, classes to read about, methods which may be of help, ect.

Please and thank you.
If history is to change, let it change. If the world is to be destroyed, so be it. If my fate is to die, I must simply laugh.
- Magus

"The state must declare the child to be the most precious treasure of the people. As long as the government is perceived as working for the benefit of the children, the people will happily endure almost any curtailment of liberty and almost any deprivation." - Adolph Hitler
Lawtonfogle
Freshman
Freshman
 
Posts: 2
Joined: Sat Apr 19, 2008 3:32 am
Location: Clemson University

Top

Postby Moons » Thu Apr 23, 2009 7:53 am

I have the same issue here!
Moons
Developer
Developer
 
Posts: 25
Joined: Fri Feb 13, 2009 9:19 pm

Postby padde » Thu Apr 23, 2009 12:26 pm

Afaik there is no direct way to query a MySql DB for example.
I read once that there is a theoretical way with jdbc drivers. But a
android client -> server -> db architecture is better anyway.
XML as protocol and some php code on a server thats all.
I have a sample code here in the forum .. the thread was
about a simple login or something like that.
If you want to exchange complex oder huge amount of data
i would suggest some investigation in JSON and SOAP or REST.

Greets
Padde
padde
Master Developer
Master Developer
 
Posts: 443
Joined: Wed Apr 08, 2009 4:52 pm

Postby Lawtonfogle » Thu Apr 23, 2009 1:09 pm

padde wrote:Afaik there is no direct way to query a MySql DB for example.
I read once that there is a theoretical way with jdbc drivers. But a
android client -> server -> db architecture is better anyway.
XML as protocol and some php code on a server thats all.
I have a sample code here in the forum .. the thread was
about a simple login or something like that.
If you want to exchange complex oder huge amount of data
i would suggest some investigation in JSON and SOAP or REST.

Greets
Padde


I switched off my last project because it was getting into SOAP and REST and I wasn't sure what I was doing.

But let me see if I understand you. You are saying that (except in a possible way using jdbc drivers, which I will have to go look up), there is no way to query a database without some php code written on the server that you will use, and have that code query the database for you. That seems really troublesome. Well, maybe if I can find something with the jdbc drivers...

Thanks.
If history is to change, let it change. If the world is to be destroyed, so be it. If my fate is to die, I must simply laugh.
- Magus

"The state must declare the child to be the most precious treasure of the people. As long as the government is perceived as working for the benefit of the children, the people will happily endure almost any curtailment of liberty and almost any deprivation." - Adolph Hitler
Lawtonfogle
Freshman
Freshman
 
Posts: 2
Joined: Sat Apr 19, 2008 3:32 am
Location: Clemson University

Postby padde » Thu Apr 23, 2009 2:51 pm

Well.. not necessarily php ... afaik SOAP doesn't need php.
I avoided SOAP too.. but i needed just small data amount
sended back to android.. so i took the less bitter pill and
implemented basic XML protocol with a php file on server
side.

I wish you good luck for your jdbc research!



Greets
Padde
padde
Master Developer
Master Developer
 
Posts: 443
Joined: Wed Apr 08, 2009 4:52 pm

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: Google Feedfetcher and 4 guests