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 next message
forlano is currently offline  forlano
Messages: 1189
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

Re: SqlArray view update [message #42076 is a reply to message #42024] Sun, 16 February 2014 19:25 Go to previous message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
The most straightforward is ReQuery.

Mirek
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 Jun 16 08:05:35 CEST 2024

Total time taken to generate the page: 0.01713 seconds