[Chargeable] MSMariaDB - Another connector to MySQL

Tom Law

Active Member
Licensed User
Longtime User
Thank you Peter. In the end I managed to get remote access through another host (freesqldatabase.com) so it all worked out well eventually.
 

vbmundo

Well-Known Member
Licensed User
Hi,

Does this APP support SSL and are suitable for a big MySQL Manager APP ?

I'm writing an MySQL Manager (as HeidiSQL) for ANDROID and need the BEST MySQL Control.

Regards
 

monki

Active Member
Licensed User
Longtime User
Hello, manfred,
Today I have made adonation.
Please, send me the library.
Regards
Monki
 

jahswant

Well-Known Member
Licensed User
Longtime User
Hi @DonManfred I'm Confused with the new Version.I Used All The Subs But I Still Get Sub Not Found Exception.

B4X:
Sub Query_CallableResult(data As List, meta As Map)
   
End Sub

Sub Query_Status(Connected As Boolean, ReConnecting As Boolean, RetriesLeft As Int)
    Log("Connected  = " & Connected)
    Log("ReConnecting = " & ReConnecting)
    Log("RetriesLeft = " & RetriesLeft)
End Sub

Sub Query_ExecResult(meta As Map)
    Log(meta)  
End Sub
Sub Query_BatchResult(batch As Map)
    Log("MySQL_BatchResult()")
    Log("Time: "&batch.Get("ms")&"ms")
    Log("Size: "&batch.Get("size"))
    Dim res As List = batch.Get("results")
    Log("Results: "&res.Size)
    For i=0 To res.Size-1
        Log(i&"="&res.Get(i))
    Next  

    ' (MyMap) {ms=316, size=10, results=(ArrayList) [1, 1, 1, 1, 1, 1]}
    Log(batch)  
End Sub
Sub Query_QueryResult2(data As List, meta As Map)
    'Dim m As Map = meta
    Log("MySQL_QueryResult2(Columns "&meta.get("ColumnCount") _
    &", Records "&meta.Get("RecordCount")&","&meta.Get("ms")&"ms)")
    Log("Records: "&data.Size)
    For i=0 To data.Size-1
        Log(data.Get(i))
    Next  
End Sub

Sub Query_QueryResult(data As List, meta As Map)
    Dim m As Map = meta
    'MySQL_QueryResult2((MyMap) {ColumnCount=3, RecordCount=5, ms=32})
    Log("MySQL_QueryResult(Columns "&m.get("ColumnCount")&", Records " _
    &m.Get("RecordCount")&","&m.Get("ms")&"ms,"&m.Get("TaskID"))

End Sub
Sub Query_ListTables(tables As List, ms As Long)
    Log("MySQL_ListTables("&ms&"ms)")
    For i=0 To tables.Size-1
        'Log("Table "&tables.Get(i))
    Next
End Sub

But Still This.

B4X:
Raising.. query_status
Connected to Database
Raising.. query_status
Connected to Database
Raising.. query_status
Connected to Database
Raising.. query_status
Connected to Database
Connected  = true
ReConnecting = false
RetriesLeft = 0
Connected  = true
ReConnecting = false
RetriesLeft = 0
java.lang.Exception: Sub  was not found.
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
    at anywheresoftware.b4a.keywords.Common$5.run(Common.java:996)
    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:5021)
    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:827)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:643)
    at dalvik.system.NativeStart.main(Native Method)
 

DonManfred

Expert
Licensed User
Longtime User
But I Still Get Sub Not Found Exception.
the error you got is not a error from the library... The error the lib send is always

Sub NOT FOUND: subname
Where subname is the name of the sub which does not exists.

i dont know what causes this error.
 

jahswant

Well-Known Member
Licensed User
Longtime User
the error you got is not a error from the library... The error the lib send is always

Sub NOT FOUND: subname
Where subname is the name of the sub which does not exists.

i dont know what causes this error.
I will investigate more deeply...
 

Eugenio

Member
Licensed User
Longtime User
Hello!

Please!

How to set or change the port (3306) to other value in MsMySql Lib ?

Thanks!
 

scsjc

Well-Known Member
Licensed User
Longtime User
Hello, DonManfred, today i try your library ... is wonderful... very fast and easy to use.
The only thing missing is work with "singlequery(select...." direct "without async"

Thanks for your work!!!
 
Last edited:

Gardea

Member
Licensed User
Longtime User
Hello, manfred,
Today I have made adonation.
Please, send me the library.
Thank You...

Regards
Gardea
 

Gardea

Member
Licensed User
Longtime User
hello, DonManfred,
I have an error Java.lang.NullPointerException
can you give me a hint about this error?

This is my code :

B4X:
Sub ButtonProses_Click
    DateTime.DateFormat = "yyyy-MM-dd"
    backoffice.QueryASync("SELECT * FROM pos_header_trans WHERE (tgl_trans>='"&DateTime.Date(AnotherDatePicker1.GetDate)&"' AND tgl_trans<='"&DateTime.Date(AnotherDatePicker2.GetDate)&"');","ddsql1")
End Sub

Sub ddsql_Status(Connected As Boolean, ReConnecting As Boolean, RetriesLeft As Int)
    Log(Connected)
End Sub

Sub ddsql_QueryResult(data As List, meta As Map)
    'Dim m As Map = meta
    ttljual=0
    ttltamu=0
    ttlkartu=0
    ttltunai=0
   
    For i=0 To data.Size-1  '--> Line 78
        Dim cur As Map = data.Get(i)
        Log("Cur : "&cur)
        ttljual=ttljual+cur.Get("ttl_hrg_jual")
        ttltamu=ttltamu+1
        If cur.Get("ttl_bayar")>0 Then
            ttltunai=ttltunai+cur.Get("ttl_hrg_jual")
        End If
        If cur.Get("bayar_kartu")>0 Then
            ttlkartu=ttlkartu+cur.Get("ttl_hrg_jual")
        End If         
    Next  
   
    LabelTotalJual.Text=NumberFormat2(ttljual,0,0,0,True)
    LabelTtlTamu.Text=NumberFormat(ttltamu,0,2)
    LabelTtlCash.Text=NumberFormat2(ttltunai,0,0,0,True)
    LabelTtlKartu.Text=NumberFormat(ttlkartu,0,2)
       
End Sub

And This is from Logs :

B4X:
** Activity (main) Pause, UserClosed = false **
** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (penjualan) Create, isFirst = true **
Class not found: b4a.example.anotherdatepicker, trying: tabisoft.example.anotherdatepicker
Class not found: b4a.example.anotherdatepicker, trying: tabisoft.example.anotherdatepicker
Raising.. ddsql_status
Connected to Database
** Activity (penjualan) Resume **
true
lib:queryasync()
lib:Exception:java.lang.NullPointerException
Error occurred on line: 78 (Penjualan)
java.lang.NullPointerException
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:696)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:337)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:247)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
    at anywheresoftware.b4a.BA$2.run(BA.java:328)
    at android.os.Handler.handleCallback(Handler.java:733)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:146)
    at android.app.ActivityThread.main(ActivityThread.java:5653)
    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:1291)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
    at dalvik.system.NativeStart.main(Native Method)
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **

Thank you...
 

Magma

Expert
Licensed User
Longtime User
This library is fast ?
Is it secure ?
Works ok with utf-8 ?

Better than using php or asp at server side ?

LIMIT/TOP 1 works in reality for this lib (not slow like opening all records) ?

Thanks in advance.

 

Peter Simpson

Expert
Licensed User
Longtime User
This library is fast ?
Is it secure ?
Works ok with utf-8 ?

Better than using php or asp at server side ?

LIMIT/TOP 1 works in reality for this lib (not slow like opening all records) ?

Thanks in advance.

This library is fast ?
Yes extremely

Is it secure ?
You can use AES_ENCRYPT() and AES_DECRYPT() functions

Works ok with utf-8 ?
Yes

Better than using php or asp at server side ?
I personally only use this library as I personally prefer everything internal in the app, but that's my personal preference. Each developer to their own.

LIMIT/TOP 1 works in reality for this lib (not slow like opening all records) ?
Works fine, no speed issues.
 

DonManfred

Expert
Licensed User
Longtime User
This library is fast ?
i think it is one of the fastest.
Is it secure ?
I dont suggest to use it in a production app as you need to store the databasecredentials in the App. No.
Works ok with utf-8 ?
Yes.
Better than using php or asp at server side ?
Depends on your needs. I´m using php in my apps due to security.
LIMIT/TOP 1 works in reality for this lib (not slow like opening all records) ?
I cant answer this. I dont have any problem with the lib so far.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…