Oscarin
Member
I am using this tutorial
To connect to a MySQL DB, everything works fine, but I have a problem.
Sometimes I need for the query to finish before proceeding to the next line of code
This is what I want to do
I do a SELECT * FROM and base on the result I give a variable a TRUE or FALSE value and will do either an INSERT or an UPDATE, the problem is that because is asynchronous
the value never changes, I don't want to use the sleep function because I don't know how much time it will take for the result to be given, and I know that I can use the WAIT FOR but unfortunately I don't know where to put it and how to use it.
Any help would be appreciated.
PS
I am using the same code as the tutorial, just modified to my needs.
Connect Android to MySQL Database Tutorial
A new more powerful framework is now available: jRDC2. This tutorial explains the basic concepts required for creating a connection between Android device and a remote server. In this case it is a MySQL database. A tutorial for connecting to SQL Server is available here. Android cannot connect...
www.b4x.com
Sometimes I need for the query to finish before proceeding to the next line of code
This is what I want to do
I do a SELECT * FROM and base on the result I give a variable a TRUE or FALSE value and will do either an INSERT or an UPDATE, the problem is that because is asynchronous
the value never changes, I don't want to use the sleep function because I don't know how much time it will take for the result to be given, and I know that I can use the WAIT FOR but unfortunately I don't know where to put it and how to use it.
Any help would be appreciated.
PS
I am using the same code as the tutorial, just modified to my needs.