Android Question DonManfred Mysql Library

victormedranop

Well-Known Member
Licensed User
Longtime User
Hi, I'm using and amazing library for MySQL and mariaDB.
but I need to know if I can use two different query on the same activity.

I see the is only one rise function that is MySQL_QueryResult.

But cant find the way to have different rise functions.

Thanks

Victor



 

DonManfred

Expert
Licensed User
Longtime User
It is async. You can set a different task string to it... But you can start multiple queries at once... For each the result sub is raised
 
Upvote 0

victormedranop

Well-Known Member
Licensed User
Longtime User
That's means there is only room for one query_result.
no matter if I have two or three query in the same activity.
but how the sub queryResult can difference from query to query.

Victor
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
B4X:
    db.QueryASync("SELECT * FROM `table`",1) ' here the 1
    db.QueryASync("SELECT * FROM `anothertable`",2) ' here the 2

B4X:
Sub MySQL_QueryResult(data As List, meta As Map)
    Log($"MySQL_Queryresult(${meta})"$)

MySQL_Queryresult({ColumnCount=8, RecordCount=198, TaskID=1, ErrorCode=0, ms=306})
 
Upvote 0

victormedranop

Well-Known Member
Licensed User
Longtime User
thanks I found what you said first,

on query select, task id was (data1111)
in result I received :(MyMap) {ColumnCount=5, RecordCount=5, TaskID=data1111, ms=3}
I can do everything I want.

amazing lib,

Thanks again.

Victor
 
Upvote 0
Top