Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 5 of 5 total |
INSERT script creating unstable table |
Wed, Jun 7 2006 10:35 AM | Permanent Link |
adam | I am using a cumbersome but (I thought) pretty bullet-proof method of setting up a table:
DELETE FROM Status ; ALTER TABLE Status LAST AUTOINC 0 ; INSERT INTO Status (LogicalOrder, Name, LinkTable) VALUES (1, 'New Task', 'Task') ; INSERT INTO Status (LogicalOrder, Name, LinkTable) VALUES (1, 'NPD', 'Product') ; INSERT INTO Status (LogicalOrder, Name, LinkTable) VALUES (1, 'New CustSupp', 'CustomerSupplier') ; ......... etc., etc. i.e. I write in each new record manually. This is done as part of a larger set of scripts which set up other tables. -- Unfortunately the resulting table has problems: when I view it it still contains data from prior to the "DELETE" ... this data seems to be held in "old" indexes which don't seem to be deleted by the "DELETE" statement. If I run a "Repair" statement it all works OK. I am using 3.30 Do I have to manually DROP INDEX for all the indexes of the table when I call DELETE? That seems cumbersome! Or am I making some other basic mistake. Adam |
Wed, Jun 7 2006 12:03 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | adam
Is the table corrupt to start with? Roy Lambert |
Wed, Jun 7 2006 5:13 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Adam,
<< Unfortunately the resulting table has problems: when I view it it still contains data from prior to the "DELETE" ... this data seems to be held in "old" indexes which don't seem to be deleted by the "DELETE" statement. If I run a "Repair" statement it all works OK. >> I'm with Roy on this one - I would verify the table prior to executing the process to make sure that the table isn't corrupted. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Jun 9 2006 6:10 AM | Permanent Link |
adam | I am with you that my "Status" table might have been corrupted the first time, but the
behaviour repeats itself, even if I do a table repair. i.e. Run Script. Get corrupt table ... ho hum, use DBSys to repair table Run Script ... table is corrupt again & the reason seems to be the existance of indexes that don't "match" the data. -- Does the "DELETE TABLE TableName" SQL Statement delete / drop all the indexes on a table all the time?? Adam |
Fri, Jun 9 2006 10:52 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Adam,
<< Does the "DELETE TABLE TableName" SQL Statement delete / drop all the indexes on a table all the time?? >> Yes. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Sunday, May 5, 2024 at 10:18 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |