I tried all the examples but the only one that gives me results and this, I would like the operation to be done faster and maybe in the background,
B4X:
Sub query
Dim query1 As String = ""
If sql1.IsInitialized = False Then
If File.Exists(File.DirApp,"..\data.db") = True Then
sql1.InitializeSQLite(File.DirApp,"..\data.db", False)
Else
fx.Msgbox(MainForm,"Data not found","Alert")
End If
End If
For i = 5267 To ListView1.Items.Size-1
Label1.Text = i
Dim lb As Label = ListView1.Items.Get(i)
Dim li As List =lb.Tag
Try
query1="INSERT INTO data1 (name,phone,email,client,production,canal,log) Values (" & _
"'" & Regex.Replace("'",li.get(1),"''") & _
"','" & Regex.Replace("'",li.get(7),"") & _
"','" & Regex.Replace("'",li.get(9),"") & _
"','" & "Business - " & Regex.Replace("'",li.get(0),"''") & _
"','" & "Altro" & _
"','" & "4Dem" & _
"','" & DateTime.Date(DateTime.Now) & "');"
sql1.ExecNonQuery(query1)
Sleep(100)
ListView1.SelectedIndex = i
Catch
Log("error ecption " & i & " " & li.Get(1) )
End Try
Next
End Sub