Re: Reindex appears to be packing tables!
From: Debbie (britbitz_at_hotmail.com)
Date: 11/04/04
- Next message: Debbie: "Re: Reindex appears to be packing tables!"
- Previous message: Demetrios Panayotakopoulos: "Re: Trigger Failed. Is it possible to change this message"
- In reply to: Jeroen van Kalken: "Re: Reindex appears to be packing tables!"
- Next in thread: Jeroen van Kalken: "Re: Reindex appears to be packing tables!"
- Reply: Jeroen van Kalken: "Re: Reindex appears to be packing tables!"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 4 Nov 2004 09:41:41 -0500
Before the IF...ELSE...ENDIF, I convert the passed parameter to lowercase
(ie. lctable = LOWER(lctable). But my point is that the statement isn't
faling because I added a messagebox to the method to show me which part I
was falling into! The PackTable method is returning the correct value, but
it doesn't seem to make any difference - that's the bit I'm having trouble
with!!
-- _____ This mailbox protected from junk email by MailFrontier Desktop from MailFrontier, Inc. http://info.mailfrontier.com "Jeroen van Kalken" <I@dont.like.spam> wrote in message news:hcpio0p9fmsuig02428rdvc5v41cnjqim5@4ax.com... > On Wed, 3 Nov 2004 12:06:19 -0500, "Debbie" <britbitz@hotmail.com> > wrote: > > Since adir() returns filenames in uppercase, your IF statement will > probably fail. (see below) > >>I didn't list all of my code in the message I posted, but I do test to see >>if the file can be opened exclusively. If it can't, I let the user know >>which table and then move on to the next one listed in the array. I'm not >>getting any errors, it's just packing all the tables irrespective of >>whether >>I said it was okay to do so or not! >> >>As for the PackTable method, it's just a simple IF...ELSE...ENDIF, ie: >> >>IF lctable = "table1.dbf" OR lctable = "table2.dbf" OR "table3.dbf" && Etc > change it to: > IF inlist(lower(lcTable),"table1.dbf", "table2.dbf", "table3.dbf",...) >>etc >> RETURN .F. >>ELSE >> RETURN .T. >>ENDIF >> >>Do you have any other suggestions? Thanks! > You could even shorten it to: > proc PackTable > Return inlist((lower(lcTable),"table1.dbf", "table2.dbf", > "table3.dbf",...) > >>Debbie :o) >> >> >> >>"Craig Berntson" <iamcraig@iamcraigberntson.com> wrote in message >>news:um0a3RcwEHA.3320@TK2MSFTNGP14.phx.gbl... >>> You didn't show the code in the PackTable method. However, if you can't >>> open the table EXCLUSIVE, you'll get an error. In addition, REINDEX is >>> not >>> reliable. The key information is stored in the header of the CDX. If >>> that >>> gets corrupt, REINDEX will either cause an error or create a corrupt >>> index. >>> >>> -- >>> Craig Berntson >>> MCSD, Visual FoxPro MVP >>> www.craigberntson.com >>> Salt Lake City Fox User Group >>> www.slcfox.org >>> www.foxcentral.net >>> >>> >>> "Debbie" <britbitz@hotmail.com> wrote in message >>> news:I-WdncJnyL3jZRXcRVn-tQ@adelphia.com... >>>>I have a reindex program that uses the ADIR() function to gather the >>>>names >>>>of all my tables and then reindex them. Before reindexing each table, I >>>>pass the table name to a method which tells me whether or not it is one >>>>that can be packed at this time (it returns .T. if the table can be >>>>packed, and .F. if it can't). My problem is that, regardless of what >>>>the >>>>method returns, all tables get packed! I added a messagebox to tell me >>>>if >>>>I was falling into the correct part of my code, and I was. >>>> >>>> llpack = THISFORMSET.PackTable(lctable) >>>> USE (lctable) EXCL ALIAS lctable >>>> IF llpack >>>> PACK >>>> REINDEX >>>> ELSE >>>> =MESSAGEBOX("Not packing.",0) && Test >>>> REINDEX >>>> ENDIF >>>> USE IN lctable >>>> >>>> Maybe I'm missing something silly, but I'd appreciate it if anyone out >>>> there had some suggestions! Thanks in advance. >>>> >>>> Debbie >>>> >>>> >>> >>> >> >
- Next message: Debbie: "Re: Reindex appears to be packing tables!"
- Previous message: Demetrios Panayotakopoulos: "Re: Trigger Failed. Is it possible to change this message"
- In reply to: Jeroen van Kalken: "Re: Reindex appears to be packing tables!"
- Next in thread: Jeroen van Kalken: "Re: Reindex appears to be packing tables!"
- Reply: Jeroen van Kalken: "Re: Reindex appears to be packing tables!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|