Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. articles. downloads. faq. members. files. rss.
 From: Mike Yearwood
  Where is Mike Yearwood?
 Toronto
 Canada
 Mike Yearwood
 To: Koen Piller
  Where is Koen Piller?
 Santpoort-Zuid
 Netherlands
 Koen Piller
Subject: RE: Open dbf file exclusively before REINDEX
Thread ID: 438472 Message ID: 438523 # Views: 38 # Ratings: 1
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Friday, July 22, 2016 2:11:32 PM         
   



> >
> > The code ran as you posted it. What was the table name and alias you tried?
> > You could do...
> >
> >
select (m.lcmyTable)
> > Use (m.lcmyTable) Exclusive

> >
> > Should be LPARAMETERS.
> >
> > Should remember and reset the current alias. It's been said the reindex is less safe than doing a full script of new indexes. If you used gendbcx to get the indexing code, you could call that from this program.
> >
>
> Mike,
>
> Grr, it must have been the time of the day, last night. You are correct, not a function but a procedure!
> Now it runs like a charm.
> Thanks for correcting me.
>
> Regards,
> Koen

Truth be told, FoxPro does not care if you declare it a function or a procedure. It is only how you call it that matters. This penchant everyone has for putting things in a single file is a big waste of time. If you made that reindexer.prg you would simply drop it in a folder and it's ready to go. If two programmers were to try to edit the procedure library at the same time, without source control, they could not. That argues against the procedure library concept, which by the way, is only needed way back when we did not have long file names!

Mike Yearwood
Microsoft MVP Visual FoxPro 2008, 2009
We have enough youth. We need a fountain of smart!
There may be many ways to skin a cat, but there are very few right ways to do it.
You can't teach an old dog new tricks. Heaven forbid I become a dog or old.

ENTIRE THREAD

Open dbf file exclusively before REINDEX Posted by Thom Magneto @ 7/21/2016 8:25:40 AM
RE: Open dbf file exclusively before REINDEX Posted by Borislav Borissov @ 7/21/2016 8:32:11 AM
RE: Open dbf file exclusively before REINDEX Posted by Thom Magneto @ 7/21/2016 8:41:53 AM
RE: Open dbf file exclusively before REINDEX Posted by Tore Bleken @ 7/21/2016 9:04:45 AM
RE: Open dbf file exclusively before REINDEX Posted by Koen Piller @ 7/21/2016 1:55:08 PM
RE: Open dbf file exclusively before REINDEX Posted by Borislav Borissov @ 7/21/2016 1:57:53 PM
RE: Open dbf file exclusively before REINDEX Posted by Koen Piller @ 7/21/2016 5:55:29 PM
RE: Open dbf file exclusively before REINDEX Posted by Paul Gibson @ 7/21/2016 6:19:13 PM
RE: Open dbf file exclusively before REINDEX Posted by Mike Yearwood @ 7/21/2016 7:14:03 PM
RE: Open dbf file exclusively before REINDEX Posted by Koen Piller @ 7/21/2016 8:04:21 PM
RE: Open dbf file exclusively before REINDEX Posted by Gene Wirchenko @ 7/21/2016 10:57:54 PM
RE: Open dbf file exclusively before REINDEX Posted by Koen Piller @ 7/21/2016 11:35:39 PM
RE: Open dbf file exclusively before REINDEX Posted by Mike Yearwood @ 7/22/2016 12:27:07 AM
RE: Open dbf file exclusively before REINDEX Posted by Koen Piller @ 7/22/2016 12:36:31 AM
RE: Open dbf file exclusively before REINDEX Posted by Gene Wirchenko @ 7/22/2016 6:59:05 PM
RE: Open dbf file exclusively before REINDEX Posted by Koen Piller @ 7/22/2016 10:50:03 PM
RE: Open dbf file exclusively before REINDEX Posted by Mike Yearwood @ 7/22/2016 11:59:39 PM
RE: Open dbf file exclusively before REINDEX Posted by Gene Wirchenko @ 7/23/2016 12:16:36 AM
RE: Open dbf file exclusively before REINDEX Posted by Mike Yearwood @ 7/22/2016 4:04:56 AM
RE: Open dbf file exclusively before REINDEX Posted by Mike Yearwood @ 7/22/2016 4:24:11 AM
RE: Open dbf file exclusively before REINDEX Posted by Koen Piller @ 7/22/2016 7:14:48 AM
RE: Open dbf file exclusively before REINDEX Posted by Mike Yearwood @ 7/22/2016 2:11:32 PM
RE: Open dbf file exclusively before REINDEX Posted by Koen Piller @ 7/22/2016 11:00:26 PM
RE: Open dbf file exclusively before REINDEX Posted by Mike Yearwood @ 7/23/2016 12:04:33 AM