[chargeable] MSMySQL - Yet another MySQL-Library (but a FAST one :-))

benji

Active Member
Licensed User
Longtime User
when i have for example...

dbADM.QueryASync2("Select id from apertura")

the procedure not raise immediately, first finish the sub and then raise the "Sub ADMDamir_QueryResult2"
there are some way to raise immediately?
i need to set the flag, with the query...

this is my code...

B4X:
Sub btnAceptar_Click
   
    dbADM.QueryASync2("Select id from apertura")
   
    If BooApertura = False Then
        ToastMessageShow("Horario Aperturado",False)
    Else
        ToastMessageShow("Ok para Apertura",False)
    End If
   
   
   
End Sub
Sub btnSalir_Click
    Activity.Finish
End Sub

Sub ADMDamir_QueryResult2(data As List, meta As Map)
    If meta <> Null Then
        BooApertura = True
        Msgbox("Listo para Apertura","Apertura")
    Else
        BooApertura = False
        Msgbox("Ya existe","Query")
    End If

End Sub
 

benji

Active Member
Licensed User
Longtime User
sometimes, if i have this
B4X:
dbADM.QueryASync2("Select id from apertura where maquina = " & spMaquina.SelectedItem & " and Estado = 'Abierto';")
i take the control whit this
B4X:
auxcount = meta.Get("RecordCount")
then, if i have 0 in RecordCount the result is empty, but sometimes i have null like answer, why? any idea?
 

benji

Active Member
Licensed User
Longtime User
sometimes, if i have this
B4X:
dbADM.QueryASync2("Select id from apertura where maquina = " & spMaquina.SelectedItem & " and Estado = 'Abierto';")

i have records with this select, but now come empty, 1

i change the library for MSMaria and now works fine...
 

ruy

Member
Licensed User
Longtime User
I just got the libraries and am trying to test the example in "MySQLExample.zip" but get the error:

B4A version 4.30
Parsing code. 0.03
Compiling code. Error
Error compiling program.
Error description: Missing parameter.
Occurred on line: 39
db.QueryASync("select * from b4alog ORDER BY log_id ASC;",)
Word: ,

What is the missing parameter "Task"?
 

ruy

Member
Licensed User
Longtime User
It it a name you can give to this "task". You´ll get this "task" as part of the result meta data to identify the result. Can be helpful when using different queries.

How come it is not in the example code? Is this code incomplete, or it is supossed to be a running example? or am I missing something?
 

ruy

Member
Licensed User
Longtime User
I am new at B4A and I would really appreciate a fully working example (maybe the source code of "MySQL_Northwind.apk") will be very helpful. I find a little confusing some of the terms.
 

ruy

Member
Licensed User
Longtime User
I am newbie with B4A as well as with MSMySQL. In my first attempt to connect I have succeeded but only in the debug mode. It works fine but, when I go into the release it is not connecting to the database. I get a message:

An error has occurred in sub:sync_mysql_queryresult (java line:436)
java.lang.NullPointerException

I can see in the Debug log "MySQL not connected!"

What is it that I am missing, because it connects in debug but not in release?
 

ruy

Member
Licensed User
Longtime User
Thanks. I wrongly assumed it was added when the library was added. :-(
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…