Home » U++ Library support » U++ SQL » SqlArray view update
SqlArray view update [message #42024] |
Tue, 11 February 2014 19:01  |
 |
forlano
Messages: 1207 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
Hello,
I have a SqlArray and it is properly filled with the data coming from a sqlite DB. Now I run some code like this
String f = LoadFile("qualificati_c16.csv");
Vector<String> records = Split(f, "\n");
SQL.Execute("DELETE FROM qualificati");
for (i=0; i<records.GetCount(); i++) {
Vector<String> r = Split( records[i], ";", false);
if (r.GetCount()>3) SQL.Execute("INSERT INTO qualificati (id_fsi,nome,data,idcircolo,siglaprov,siglareg,sesso) VALUES(?,?,?,?,?,?,?)", r[0],r[1],r[2],r[3],r[4],r[5],r[6].Mid(0,1));
}
and change the content of the database.
Unfortunately the SqlArray does not know that the DB is changed and continue to show old data already gone.
I guess there should be some smart way to tell SqlArray to read again the database and show its new content.
I tried Update() but no success, perhaps it is intended for something else.
Thanks,
Luigi
[Updated on: Tue, 11 February 2014 19:02] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Fri Apr 25 12:26:02 CEST 2025
Total time taken to generate the page: 0.00715 seconds
|