Hello @Anser,
I've just checked this library version 0.36 with Stored Procedures and I found that it works 100% perfect with both inserting and extracting of data to and from one of my MySQL databases with the Call statement.
I hope that this helps you...
CALL GetCustomerLevel(103,@level);
SELECT @level AS level;
DELIMITER //
CREATE PROCEDURE CountCountry(
IN `Countries` VARCHAR(20),
OUT `Total` INT)
BEGIN
SELECT COUNT(*)
INTO `Total`
FROM `Country`
WHERE `Name`
LIKE CONCAT('%', Countries ,'%');
END //
DELIMITER ;
'Code in B4A
MySQL.ExecuteASync("Call CountCountry('unit', @Total)")
MySQL.QueryASync2("SELECT @Total AS `Countries`")
db.QueryASync("select * from b4alog ORDER BY log_id ASC;","mytest")
** Service (newinst2) Start **
-- AppUpdating.NewInst2: processing service_start
** Activity (main) Create, isFirst = true **
Sub NOT FOUND: 'mysql_status
Connected to Database
** Activity (main) Resume **
Activity_Resume()
SqlException: com.mysql.jdbc.exceptions.jdbc4.MySQLDataException: '1.421930164762E12' in column '3' is outside valid range for the datatype INTEGER.
MySQL_QueryResult(null)
main_mysql_queryresult (java line: 437)
java.lang.NullPointerException
at b4a.example.main._mysql_queryresult(main.java:437)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:187)
at anywheresoftware.b4a.BA$3.run(BA.java:332)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
java.lang.NullPointerException
Sub mysql_Status(Connected As Boolean, ReConnecting As Boolean, RetriesLeft As Int)
Log("Connected = " & Connected)
End Sub
What sample???The sample included in the lib
There was a sample project included in the zip file which came along with this lib. I simply tried to compile and run that sample without making any changes to it. Unfortunately it throwed the errors that I specified in my previous post.Hello @Anser, I always use QueryASync2, try using QueryASync2 instead...
You are also missing a sub, please add the following to your code.
What sample???
QueryASync returns = {Name=Aruba, Continent=North America, Region=Caribbean, Population=103000, LocalName=Aruba}By the way what is he difference between QueryASync and QueryASync2
It does not matter if the sub does not exist. The event will just not raise then.You are also missing a sub, please add the following to your code.
No, PLEEEEEEEEEEEEEEEEEASE do not remove the nagging message. I think that it's a great sub that really comes in handy and should be there as standard. It help me remember to check the connection status and without that nagging message I would never had added that sub. No Leave the nagging message there, I think that it will help other users of your great library too
Sub Globals
Private reqManager As DBRequestManager
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
reqManager.Initialize(Me, RdcServerIP)
End If
End Sub
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?