I am making a remote connection to a MySQL database.
To refresh the data, I created a function that makes a series of questions to the server, and depending on these questions receive answers.
To make the program a little easier, I have tried to create a service module a bit special.
The idea is to create a function like: doajax (MyWeb, command, val1, val2, val3, val4, val5, ...) where valx are variables, and this function returns me the data directly from the server.
Tested with Visual Vasic Scrips working properly.
I leave a very simplified example of what I intend to do. In the final program, instead of running from the buttons, would be implemented at intervals with a timer. But now is not work at all.
The idea of doing so, is because it is much easier to work with it, as in the original example of Erel (Connect to MySQL Database Android Tutorial) responses are executed in a separate function. With this idea you can ask and immediately executed. For example you could run the following structure:
if doajax (xx1) = "yy1" then
...
else
if doajax (xx2) = "yy2" then
...
end if
end if
Do you find any failure of concept? Is there a similar way to do it?
The service module is working correctly, the problem is that in the main there is something wrong. When you press the button 1 or 2, sometimes works and sometimes does not.
Thanks in advance.
Regards, Joan Ramon.
To refresh the data, I created a function that makes a series of questions to the server, and depending on these questions receive answers.
To make the program a little easier, I have tried to create a service module a bit special.
The idea is to create a function like: doajax (MyWeb, command, val1, val2, val3, val4, val5, ...) where valx are variables, and this function returns me the data directly from the server.
Tested with Visual Vasic Scrips working properly.
I leave a very simplified example of what I intend to do. In the final program, instead of running from the buttons, would be implemented at intervals with a timer. But now is not work at all.
The idea of doing so, is because it is much easier to work with it, as in the original example of Erel (Connect to MySQL Database Android Tutorial) responses are executed in a separate function. With this idea you can ask and immediately executed. For example you could run the following structure:
if doajax (xx1) = "yy1" then
...
else
if doajax (xx2) = "yy2" then
...
end if
end if
Do you find any failure of concept? Is there a similar way to do it?
The service module is working correctly, the problem is that in the main there is something wrong. When you press the button 1 or 2, sometimes works and sometimes does not.
Thanks in advance.
Regards, Joan Ramon.