victormedranop Well-Known Member Licensed User Longtime User Sep 26, 2016 #1 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
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 Sep 26, 2016 #2 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
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
victormedranop Well-Known Member Licensed User Longtime User Sep 26, 2016 #3 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
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
DonManfred Expert Licensed User Longtime User Sep 26, 2016 #4 You can set a string as last parameter. Task This task will be in the metadata of the result sub Upvote 0
victormedranop Well-Known Member Licensed User Longtime User Sep 26, 2016 #5 I cant find that in the documentation, can you post and example? regards, Victor Upvote 0
DonManfred Expert Licensed User Longtime User Sep 26, 2016 #6 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}) Click to expand... Upvote 0
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}) Click to expand...
victormedranop Well-Known Member Licensed User Longtime User Sep 26, 2016 #7 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
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
victormedranop Well-Known Member Licensed User Longtime User Dec 18, 2016 #8 Can I use this library with B4J? Thanks DonManfred Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Dec 19, 2016 #9 B4J SQL library can work with any JDBC driver directly. Upvote 0