Make sure to check the connected status of the library before you send out any queries. Wait for the connected state...
Maybe you just frgot to add internetpermission?
Maybe you just frgot to add internetpermission?
Sub Activity_Resume
Log("Activity_Resume()")
lv1.Clear
lv1.AddSingleLine2("Categories","Categories")
lv1.AddSingleLine2("Employees","Employees")
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub MySQL_ExecResult(meta As Map)
Log(meta)
End Sub
Sub MySQL_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 MySQL_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 MySQL_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"))
ToastMessageShow("MySQL retrieved "&m.Get("RecordCount")&" records in "&m.Get("ms")&"ms",True)
lv2.Clear
For i=0 To data.Size-1
If m.Get("TaskID") = "Categories" Then
Dim cur As Map = data.Get(i)
Dim bmp As Bitmap
Dim In1 As InputStream
Dim buffer() As Byte
buffer = cur.Get("Picture")
In1.InitializeFromBytesArray(buffer,0,buffer.Length)
bmp.Initialize2(In1)
lv2.AddTwoLinesAndBitmap(cur.Get("Description"),cur.Get("CategoryName"),bmp)
'Log("r:"&data.Get(i))
Else If m.Get("TaskID") = "Employees" Then
Dim cur As Map = data.Get(i)
Dim bmp As Bitmap
Dim In1 As InputStream
Dim buffer() As Byte
buffer = cur.Get("Photo")
In1.InitializeFromBytesArray(buffer,0,buffer.Length)
bmp.Initialize2(In1)
lv2.AddTwoLinesAndBitmap(cur.Get("FirstName")&" "&cur.Get("LastName"),cur.Get("Title"),bmp)
'Log("r:"&data.Get(i))
Else
'Log("r:"&data.Get(i))
End If
Next
End Sub
Sub MySQL_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
Sub lv1_ItemClick (Position As Int, Value As Object)
Dim t As String = Value
db.QueryASync("select * from "&t&";",t)
End Sub
Most probably yesTo connect to the KSWEB MySQL server, should I use "localhost" or the IP address ?
The port you setup in ksweb for the mysql database. probably 3306what port number ?
together with the xml and jar from the lib to the additional libs folder. If you get any new jar with a library which contains additiional JARs. They always have to placed in the additional libs folder.where do I put the java conector?
On your server/your provider which is hosting the dbwhere the database is hold ?
On your server/your provider which is hosting the db
They are working seperately.the libs work together or are separate ?
It will connect to your database directly using a tcp-connectionI do not understand how the lib will connect to mydatabase
Aehm, i did not understand the question!?How do I store and link the service provider to the data base are any other tehnical constraints to the database holder?
The Database-provider limit the speed to its internetconnection. Usually webserver with databases have good connetions. Th other limitation is the speed of your devices internetconnection. It will not run smooth using a slow internetconnection and fetching a lot of dataParse showed that can support 30 requests / second , now how is reposible for the data speed transfer ..the database server provider ?
The advantage of the MariaDB connector is that it can connect to a MySQL-Database too (not just to a MariaDB-Database). AND it has an much smaller footprint.....is there anything that connects your lib to this mariaDB community ?
Seems that the MariaDB Connector does not provide methods for it. At least not with the same name as the MySQL Connector.Hey Manfred, will you be adding setPeparedBlob, setPeparedBlob2 etc into this particular library?
Sadly to say that but yes.that I will have to stop using the connector