Android Question Connect to MySQL hosting online

Dario126

Member
Licensed User
Longtime User
Well I'm more-less newbie for online services, but I have app which works with local DB, and I would like to add possibility to work with online MySQL server.

This server is public, and I have no possibility to implement some PHP scripts, or some midleware servers on that machine, or even modify ODBC. I only have server name, username and password for my database. This works fine from any PC app.

How do I connect to this database from my b4a app?
 

DonManfred

Expert
Licensed User
Longtime User
2. Use this library: MySQL Library with jdbc
Note that this library is problematic and I usually do not recommend using it.

What exactly is problematic... Usually i would prefer using a direct mysql-connection instead of a rdc-bridge which works over httputils..
 
Upvote 0

keirS

Well-Known Member
Licensed User
Longtime User
What exactly is problematic... Usually i would prefer using a direct mysql-connection instead of a rdc-bridge which works over httputils..
What exactly is problematic... Usually i would prefer using a direct mysql-connection instead of a rdc-bridge which works over httputils..


Lots of reasons it's problematic.

1. It uses networking on the main UI thread.
2. It returns all the results as a list which is a memory hog.
3. It doesn't set mySQL up to stream the result set.
4. It doesn't use a cached result set. This is a must if you are using a 3g or 4g connection.
 
Upvote 0
Top