PUBLIC SUB Button1_Click()
DIM $hConn AS NEW Connection
DIM datanome AS String
DIM datapercorso AS String
DIM sql AS String
DIM hres AS Result
DIM hres2 AS Result
Label1.text = "importazione dati nel database"
Wait 0.1
datanome = "camigest"
datapercorso = "/home/matteo/Scrivania/Gestionale/CAMIGest/database/"
WITH $hConn
.Type = "sqlite3"
.Host = datapercorso
.Login = ""
.Password = ""
END WITH
$hConn.Name = datanome
$hConn.Open
sql = "SELECT*FROM tab"
hres2 = $hConn.Exec(sql)
i = 1 / hres2.Count
FOR EACH hres2
ProgressBar1.Value = ProgressBar1.Value + y
Wait 0.1
$hConn.Begin
hres = $hConn.Create("tab2")
hres!descrizione = hres2!Descrizione
hres!tipo = hres2!Tipo
hres.Update
$hConn.Commit
NEXT
END