1

i know very well that android not support the mysql but i need to connect mysql and get the information from database

i studied there are SOAP and REST services to connect mysql from android is it possible?then give me one idea and if possible one example pls

BenMorel
  • 30,280
  • 40
  • 163
  • 285
renuka
  • 29
  • 4
  • 1
    Tag it whatever you want, it's still duplicate of [mysql to android using soap](http://stackoverflow.com/questions/4181712/mysql-to-android-using-soap) – OMG Ponies Nov 15 '10 at 06:12
  • Please don't repost questions. This is not going to get you faster answers. – Halil Özgür Nov 15 '10 at 08:57

2 Answers2

0

i need to connect mysql and get the information from database

You can get the data from the database with or without connecting to it. You can get it with or without SOAP. An agent on the server, usually a CGI sript makes the database request on the client's behalf. In SOAP, the the query and response are often encoded in XML, and always transmitted by standard Internet methods such as HTTP or SMTP.

Non SOAP methods include CORBA, simple RPC, and home-grown solutions. If the database is open to the Internet, then a direct connection to the database port on the server is possible.

It's only the security restrictions that limit what you can do. In an environment where only mail, HTTP and FTP are possible, SOAP is a good protocol. If the client is actually a web browser, then AJAX is ideal.

For a typical data request, all you need to know is the URL (and associated protocol) on the server to query for the data. For example, using HTTP:

http://dataserer.example.com/chart_data.cgi?chart_num=2 

The server-side script, chart_data.cgi reads the query (from a GET request in this case), retrieves the information from the database and sends it, encoded in XML, back to the client, simply by writing the HTTTP header and XML content to standard output. It is Javascript and a browser protocol XMLHttpRequest that make the HTML request and XML receipt possible.

So even in Android, when you browse the web and see all that information, on Amazon for example. A lot of that information is retrieved by agents at Amazon from their database, formatted for the client(the browser on Android) and sent back to the client. No Android-specific coding is required.

Use a custom remote agent such as a CGI script on a server to access a remote database. Android only needs to communicate with the agent.

frayser
  • 1,678
  • 10
  • 16
0

Write a SOAP server using the language of your choice:

Call it from Android:

Of course, you don't have to do it in SOAP. You can just output the data from your web service in any format like JSON, plain text, XML, CSV, (or even HTML?) ... and consume it from Android.

Community
  • 1
  • 1
Halil Özgür
  • 14,749
  • 4
  • 45
  • 55
  • a very warm thanks for u r reply if possible send me the related sites really it helps to me thank u – renuka Nov 16 '10 at 03:48