[Qt-interest] QSqlQuery caching INSERT data?
Israel Brewster
israel at frontierflying.com
Thu Nov 19 23:54:11 CET 2009
On Nov 19, 2009, at 1:08 PM, KC Jones wrote:
> Are you observing the database through a model class, a la
> QSqlQueryModel? I'm using a mix of QSqlXxxxModels and directy
> QSqlQuery operations and I have to carefully call update() on my
> models to keep them in sync.
>
> Or maybe some open transactions? Those do get closed when you close
> the db.
>
> Otherwise I'm using Sqlite and I find my inserts are posted
> immediatly, as verified via external db edit tools.
Thanks for the response. No, I'm just straight QSqlQuery, no model
classes, at least in the part writing the data. Also, no transactions
at all, so that can't be the issue. But obviously I'm doing something
different, if it works for you. I'll keep looking. Thanks!
>
> On Thu, Nov 19, 2009 at 1:04 PM, Israel Brewster
> <israel at frontierflying.com> wrote:
>> Does QSqlQuery do any caching of INSERT statements? If so, is there
>> a way to
>> force the cache to be flushed to the database? I have a program that
>> executes a number of INSERT statements using QSqlQuery, but they
>> don't seem
>> to be written to disk until the app quits. Usually this isn't a
>> problem, and
>> is probably a good thing, but there are a couple of places where this
>> doesn't work for me. I tried using a QSqlDatbase::close() command,
>> but this
>> doesn't seem to produce the desired result. I didn't think
>> QSqlQuery did any
>> caching aside from results, which makes me think this is a SQLite
>> process
>> that doing the caching, but I wanted to ask here anyway. Even if it
>> is
>> SQLite, is there some Qt command I could run to make SQLite think I
>> am done
>> and write the data out? Thanks for any advice!
>> -----------------------------------------------
>> Israel Brewster
>> Computer Support Technician II
>> Frontier Flying Service Inc.
>> 5245 Airport Industrial Rd
>> Fairbanks, AK 99709
>> (907) 450-7250 x293
>> -----------------------------------------------
>>
>>
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>>
-----------------------------------------------
Israel Brewster
Computer Support Technician II
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Israel Brewster.vcf
Type: text/directory
Size: 417 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091119/4f2b99f5/attachment.bin
-------------- next part --------------
More information about the Qt-interest-old
mailing list