tags:

views:

87

answers:

2

I want to connect to a MySql DB but i don't find the code. Can anyone help me?

A: 

Try this.

Júlio Santos
That example does not connect to DB directly, but uses PHP script, which does the work and gives out JSON...
Laimoncijus
i found this before but this snippet use a php... I want to Accsess it directly.. Like in Java with the ODBC
hanswurst
You can't access it directly. The Android only supports SQLite locally :(
Júlio Santos
+1  A: 

Locally, the Android OS only supports SQLLite. To connect to a remote MySQL database, you'll need to use a webservice, either SOAP or REST.

Tyler
is there any good example?
hanswurst
The webservice should be run on the same server as the database. Use HttpClient in Android to query the database.
Tyler