I do have a B4A project that uses SQL to connect to a local SQLite database. Perfect working.
At this moment I will add a new function that needs to connect to an external public MySQL database.
If I try to use jSQL there is some conflict between SQL keyword from SQL library and jSQL library.
They both use SQL.
Public DBlite as SQL (SQL lib)
Public DBMySQL as SQL (jSQL lib)
Is there any trick to use jSQL in combination with SQL?
Setting up a webserver and a php serverside script/page is a little bit overkill for this minor function.
I really want to connect to MySQL directly. I know it is insecure by jdbc, but in this case there is no secret data.
I do have a B4A project that uses SQL to connect to a local SQLite database. Perfect working.
At this moment I will add a new function that needs to connect to an external public MySQL database.
If I try to use jSQL there is some conflict between SQL keyword from SQL library and jSQL library.
They both use SQL.
Public DBlite as SQL (SQL lib)
Public DBMySQL as SQL (jSQL lib)
Is there any trick to use jSQL in combination with SQL?
I'm suing the same local SQLite and connect to the MS SQL on the external server. I'm using OkHTTP to the website that itself connects me to the SQL server. I'm using ASP.NET and the website returns me JSON
I'm suing the same local SQLite and connect to the MS SQL on the external server. I'm using OkHTTP to the website that itself connects me to the SQL server. I'm using ASP.NET and the website returns me JSON
So you have all you need - you can create either php or asp.net page that will communicate with the db and send json back to the app. JDBC - is it secure? over http you can use https.
They are all the same and do the same work. No need to add the two.
SQL for B4A
jSQL FOR B4
iSQL FOR B4i
Connecting to Mysql db, look at the initializing method. Remote connection to online mysql database is very difficult and needs some configurations. Best bet is to connect through php or other server scripts as @Alex_197 said.
Update: Newer releases of XAMPP come with MariaDB except of MySQL. Basically the same but the php scripts have to be changed a little bit: - mysql is changed to mysqli - "$con" (variable that holds the connection) has to be added to every sql statement "mysqli_query($con,"SELECT * FROM...
Setting up a webserver and a php serverside script/page is a little bit overkill for this minor function.
I really want to connect to MySQL directly. I know it is insecure by jdbc, but in this case there is no secret data.