[V4RB] DELETE and Index Corruption

Gunnar Swan GunnarSwan at PracticeToPass.com
Mon May 19 15:13:08 CDT 2003


Are you doing all deletes with the same cursor.
Maybe create a new cursor or each record, delete the record, kill the cursor.
Start with next record to delete.


5/19/03 3:13:09 PM, Dave Addey <support at dj1800.com> wrote:

>I have a vaguely similar problem, and it's driving me mad!
>
>I have a database with 3,000 or so records.  One column is a Long field
>called UniqueID, which is indexed and unique.
>
>I load the contents of the database into a listbox.  The user can then
>select multiple rows of the listbox.  When they press delete, I attempt to
>delete all selected records by getting the UniqueID from a hidden column for
>each row, one by one, and deleting the record with that UniqueID.
>
>I have tried doing this multiple delete using an SQL statement, and also
>using a VCursor.  I get the same problem in both cases.  When doing multiple
>deletes one after another (as separate SQL statements), after a while some
>deletes fail, even though they claim to work successfully (returning no
>error).  Subsequently, my database can't find these entries with a "Select *
>from [tablename] where UniqueID [a valid value]".
>
>Interestingly, in this situation both my application and ViSQL can see these
>records, but neither can delete them.  However, Valentina App can delete
>these records.
>
>This would imply that the index has got corrupted. Certainly, rebuilding the
>index seems to help matters, but the next multiple delete fails in the same
>way.
>
>I have run a Diagnose on the database, and it comes up all okay.
>
>Believe me, I have checked my code very thoroughly.  Flushing the database
>makes no difference.  I have tried every possible way to avoid this, but to
>no avail.
>
>It's very annoying, as I can't think of a way round this!
>
>For the record, I am using 10.2.5, Valentina 4 RB 1.9.7, REALbasic 4.5.2.
>
>Please help!
>
>Thanks in advance,
>
>Dave. 
>
>------------------------------------
>Dave Addey
>dave at dj1800.com
>
>DJ-1800
>Complete MP3 DJ solution for the Mac
>http://www.dj1800.com/
>
>Support and pre-release forums:
>http://dj1800.myforums.net/
>
>_______________________________________________
>Valentina mailing list
>Valentina at lists.macserve.net
>http://lists.macserve.net/mailman/listinfo/valentina
>


Best Regards,
Gunnar Swan
http://www.PracticeToPass.Com





More information about the Valentina mailing list