Database INSERT: use Flush

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Nov 26 16:50:47 CST 2003


on 11/26/03 1:37 PM, Arthur Clemens at aclemens at xs4all.nl wrote:

>> Hi Arthur,
>> 
>> Well, yes, INSERT, as well as cursor->AddRecord() do not save record
>> on disk
>> immediately.
>> 
>> This allows you very fast add of e.g. 1000 records, and then only one
>> flush.
>> 
>> 
>> But I wonder, if you in YOUR app add by INSERT 2 records,
>> DO NOT do flush,
>> But you should do CLOSE() yes?
>> 
>> Then only you can go and open db in VAPP.
>> 
>> Close() do flush self, so you should not see problems.
>> 
>> 
>> If you open in VAPP db that is NOT closed by YOUR app then you can get
>> problems. Although VAPP should refused that.
> 
> I do ValentinaShutDown(). Should I use Close()? I can only find a
> reference to this in VSDKReference, p. 39.
> 
> If I insert a Flush() just before ValentinaShutDown() it also works
> normal.

I did try to make all my best that on Shutdown, and dbs before that are
flushed and closed.

But may be something wrong...

So to be safe you better

    close each your db

    do shutdown


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list