Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » SqlArray view update
SqlArray view update [message #42024] Tue, 11 February 2014 19:01 Go to previous message
forlano is currently offline  forlano
Messages: 1185
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

 
Read Message
Read Message
Previous Topic: Oci8 64bit support for BLOB/CLOB
Next Topic: [BUG] MySQL error 2014 while reading output from stored procedure.
Goto Forum:
  


Current Time: Sun Apr 28 15:09:00 CEST 2024

Total time taken to generate the page: 0.04315 seconds