Ok, there it is.
I will write a tuto, or something similar.
But here. If anyone needs the SO for android of mysql :
https://mega.nz/#F!sbATBbjL!l-Uc0hpfg9-XwJDb3Vc_mg for android 19, 21, 23, and 24.
So library should be placed in project folder, /libs/armeabi-v7a (if using arm7)
How to use.
WITH LAMW:
IMPORTANT:
SkipLibraryVersionCheck:=true;Doing so, I checked it works with TMySQL56Connection and TMySQL55Connection
DO NOT use the registered tool in SQLdb (uses LCL). Just declare the TMySQL56Connection, TSQLQuery,TSQLTransaction classes.
in Activity/form:
{DECLARATION OF USES}
uses
Classes, SysUtils, AndroidWidget, Laz_And_Controls,
mysql56conn,sqldb, And_jni, surfaceview, drawingview;
{PRIVATE DECLARATIONS}
private
MySQL56Connection1:TMySQL56Connection;
SQLQuery1: TSQLQuery;
SQLTransaction1: TSQLTransaction;
And to use it... for example:
{PROCEDURES}
procedure TAndroidModule1.AndroidModule1ActivityCreate(Sender: TObject;
intentData: jObject);
begin
try
MySQL56Connection1:=TMySQL56Connection.Create(nil);
MySQL56Connection1.SkipLibraryVersionCheck:=true;
ShowMessage('correcto');
except
ShowMessage('problema');
end;
end;
procedure TAndroidModule1.jButton1Click(Sender: TObject);
begin
try
try
SQLTransaction1:=TSQLTransaction.Create(nil);
SQLQuery1:=TSQLQuery.Create(nil);
SQLTransaction1.DataBase:=MySQL56Connection1;
SQLQuery1.DataBase:=MySQL56Connection1;
SQLQuery1.Transaction:=SQLTransaction1;
ShowMessage('So far so good');
except
ShowMessage('query transactor');
end;
with MySQL56Connection1 do
begin
DatabaseName:='YOUR DATABASE NAME';
HostName:='YOUR HOST.IP OR ALIAS';
Port:={PORT NUMBER WITHOUT QUOTES, ITS NUMBER NOT STRING};
Password:='YOUR PASSWORD';
UserName:='YOUR USERNAME';
end;
MySQL56Connection1.Open();
MySQL56Connection1.Connected:=true;
// ShowMessage('So far so good... still');
except
On E :Exception do begin
ShowMessage(E.Message);
end;
//ShowMessage('ERROR conection');
end;
if MySQL56Connection1.connected then begin
try
SQLQuery1.close;
SQLQuery1.SQL.Text:='YOUR QUERY...FOR THIS WITH LIMIT 1';
SQLQuery1.active:=true;
SQLQuery1.Open;
jTextView1.Text:=SQLQuery1.FieldByName('sql_field_name_1').value;
jTextView2.Text:=SQLQuery1.FieldByName('sql_field_name_2').value;
jTextView3.Text:=SQLQuery1.FieldByName('sql_field_name_3').value;
jTextView4.Text:=SQLQuery1.FieldByName('sql_field_name_4').value;
SQLQuery1.Close;
finally
end;
end;
end;