V4RB - DEFRAGMENT after deletion of records

RB User fitzbew at nc.rr.com
Sat Sep 24 10:03:16 CDT 2005


On 9/24/05 6:11 AM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:

>> Using: RB2005r3, V4RB 1.10, OS X.3.9
>> 
>> Hi,
>> 
>> Whenever I DEFRAGMENT using db.SQLexecute after deleting the records in a
>> table, the database becomes "corrupt". I get a -39 End of File record when I
>> subsequently try to open the db.
>> 
>> I've tried: 1) using the "delete from table_name" sql syntax, 2) the
>> vCursor.deleteall() syntax, and 3) just dropping the table and re-creating
>> it using SQL.  In all cases, I cannot subsequently re-open the database IF I
>> do a defragment.
>> 
>> If I comment out the DEFRAGMENT command, the db works fine.
>> 
>> I can delete the records in code, and then open the db in VAPP 1.10 and
>> perform the defragment using the VAPP utilities, but the same thing happens.
>> 
>> I found an entry in the archives suggesting that reindexing after doing
>> deletion of records and BEFORE defragmenting will guard against this error,
>> but that's not working for me.
>> 
>> This is a database file with only 2 tables with 10 fields, about 500k
>> records...no challenge here for Valentina!
>> 
>> Has anyone encountered this issue before, and found a workaround?  Any
>> suggestions on what I may be doing wrong?
>> 
>> Thanks in advance for any help or suggestions.
> 
> it sounds like your have corrupted db. so
> 
> 1) have you try diagnose it? What it says ?
> 
> 2) have you try Defrgament on FRESH generated database?
>   you can get after xml reload
>   or just generate new db

I can't diagnose the db after I get the -39 error.  I can't open the db.

I can defrag (or compress) *any* database I want as long as I have NOT
deleted any records.  The db works fine afterwards.

Or, I can delete records and NOT defrag and the DB works fine subsequently.

It is the act of of deleting all the records in a table and then defragging
which corrupts(?) the database.  (I hesitate to say "corrupt" because I do
not precisely know what is happening. All I can say is that Mac OS throws a
-39 error when I try to open the DB.)

Yes, I have created "fresh" database files from earlier XML files and they
work fine until I delete records AND do a defrag.

I was hoping for some method/workaround in a 1.10 environment that would
enable me to reclaim empty segments (as if I was doing a defrag) even though
I had deleted records.

Russ



More information about the Valentina mailing list