The recommended method to connect to remote databases is jRDC2:
https://www.b4x.com/android/forum/threads/61801/#content
Connecting to the database directly has several disadvantages:
- Insecure - it will be quite simple for a hacker to get the username and password and directly access the database.
- Hard to maintain - changes to the database design will require updating the app.
- Server and client performance issues - The Jdbc drivers are not optimized for mobile usage.
- Reliability issues due to unstable connectivity.