Public Sub reload
TableView1.Items.Clear
Try
'-------> load record agent <------------------------------
ListAgent.Initialize
sql1.InitializeSQLite(File.DirApp, "datasqlite.db", True)
RS = sql1.ExecQuery("select * from data2")
Do While RS.NextRow
Dim Row() As Object = Array (RS.GetString("nome"), RS.GetString("cognome"), RS.GetString("phone"), RS.GetString("email"), RS.GetString("code"))
ListAgent.Add(Row)
Loop
RS.Close
'-------> load record client <------------------------------
sql1.InitializeSQLite(File.DirApp, "datasqlite.db", True)
RS = sql1.ExecQuery("select * from data1")
Do While RS.NextRow
'----------------> append note record <--------------------------------
Dim RSR As ResultSet
RSR = sql1.ExecQuery("select * from data3 WHERE relation='" & RS.GetString("phone") & "';")
Do While RSR.NextRow
Dim Row() As Object = Array (RS.GetString("nome"), RS.GetString("cognome"), RS.GetString("indirizzo"), RS.GetString("citta"), RS.GetString("phone"), RS.GetString("email"),RSR.GetString("radio"), RSR.GetString("note"), RSR.GetString("agent"))
Loop
'------------------> public record into tableview <-------------------------------------------
TableView1.Items.Add(Row)
Loop
RS.Close
Catch
Log(LastException)
fx.Msgbox(MainForm,LastException,"Error try")
End Try
End Sub