Getting database data to an activity.

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

Getting database data to an activity.

Postby patrox » Thu Jul 10, 2008 8:29 am

Problem: I want to query a JDBC (mysql) database and show the reulsts of a row (or populate a list) , but i dont want to show the results in a browser , i want to place the results in certain textedit boxes (and get the parameters for the query from textedit boxes).

So , after reading a few posts in the web i finally understand that we have to use servlets. but i cant get much usefull help because all examples and tutorials ive seen refer to posting the data in HTML form.

:?: :?:

any help will be appreciated.

Thanks!
patrox
Freshman
Freshman
 
Posts: 8
Joined: Wed Apr 02, 2008 8:21 pm

Top

Postby patrox » Fri Jul 11, 2008 8:43 am

i ll try using the class Nanodeath has posted here
doing_http_post_with_android
:)
patrox
Freshman
Freshman
 
Posts: 8
Joined: Wed Apr 02, 2008 8:21 pm

Postby sam » Fri Jul 25, 2008 10:21 am

It is not necessary that you return HTML from servlet/php file. Just make your own format and return it s a string.

On Android side, parse that string. You can also use XML for this, i guess
sam
Freshman
Freshman
 
Posts: 5
Joined: Sun Jul 20, 2008 12:57 pm
Location: Pakistan

Postby patrox » Fri Jul 25, 2008 1:07 pm

thanks, thats what im trying to do.

for now, i have succeded in querying the database and getting the response , ill think about the response format in a few days.

the hardest part was to get the tomcat server and eclipse working together , i got a plugin and it works.
patrox
Freshman
Freshman
 
Posts: 8
Joined: Wed Apr 02, 2008 8:21 pm

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 3 guests