Hi there - i am trying to connect to my Mariadb sql database... but..
I am getting this :
Sub NOT FOUND: 'mysql_status
not Connected to Database
Maybe didn;t understand well.. i am using the following to connect:
and at activity_create :
Where am i wrong ?
events has the example are the following (ive just copy-paste them):
I am getting this :
Sub NOT FOUND: 'mysql_status
not Connected to Database
Maybe didn;t understand well.. i am using the following to connect:
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim db As MSMaria
end sub
and at activity_create :
B4X:
db.Initialize("MySQL","192.168.168.3:3036","root","mypass","nameofdatabase") 'MySQL is just a name for sub i believe...
Sub testButton1_Click
db.ExecuteASync("INSERT INTO tracking SET carid='" & carid & "', lat=11, lng=22, speed=33;","")
'tracking is a name of table...
End Sub
Where am i wrong ?
events has the example are the following (ive just copy-paste them):
B4X:
Sub MySQL_ExecResult(meta As Map)
Log(meta)
End Sub
Sub MySQL_BatchResult(batch As Map)
Log(batch)
End Sub
Sub MySQL_QueryResult(data As List, meta As Map)
'Dim m As Map = meta
Log("MySQL_QueryResult("&meta&")")
For i=0 To data.Size-1
'Log("r:"&data.Get(i))
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