How to get the MySQL database connection in android emulator? I try to connect using java.sql.*
package like this
I get the exception: java.sql.SQLException:no suitable drive
How can I use sql packages in android mobile?
How to get the MySQL database connection in android emulator? I try to connect using java.sql.*
package like this
I get the exception: java.sql.SQLException:no suitable drive
How can I use sql packages in android mobile?
Never never never use a database driver across an Internet connection, for any database, for any platform, for any client, anywhere. That goes double for mobile. Database drivers are designed for LAN operations and are not designed for flaky/intermittent connections or high latency.
The way I got around this was writing all the server side code in PHP and inventing my own XML schema for sending and receiving data. You just use POST or GET and send using the default HTTP classes that come with android. You can then translate the response XML from the PHP page to do what you want by using one of the three XML parsers that come with android.
You would not typically want to connect directly to a database over the web on your mobile device.
Instead of connecting directly to a database over the web you might look at creating an interface for whatever data it is you want to access and exposing it as a service:
Then you can use Java APIs to access your data.