Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Mike Yearwood
  Where is Mike Yearwood?
 Toronto
 Canada
 Mike Yearwood
 To: Cecil Champenois
  Where is Cecil Champenois?
 Little Elm
 Texas - United States
 Cecil Champenois
 Tags
Subject: RE: INSERT Command
Thread ID: 209752 Message ID: 209757 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Wednesday, December 31, 2008 12:09:31 AM         
   


> >
> >
> > Yes, the old INSERT [BEFORE] command will still work, but I believe you need to have exclusive access to the table... I'm sure there are other restrictions as well (perhaps any table with a AutoInc field may prevent it as well... I haven't experimented with it).
> >
> > To be blunt, there really is no reason to insert a record between others... for appearance's sake, the table can instead be presented in some kind of indexed order so that things "look" logical.
> >
> > I'd recommend staying away from it.
> >
> > --Brad
>
> I feel the same way about that INSERT command. Better to have indexed tables/cursors.
>
> Cecil Champenois, Jr.

It's really easy to avoid that insert command. Use a numeric field with 5 decimal places. To insert between 1 and 2, you can insert 1.12345 etc.

Before new inserts are done in a set, renumber them as integers. Having an index on that, you can easily move records up/down, etc.

Mike Yearwood
Microsoft MVP Visual FoxPro 2008



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.

ENTIRE THREAD

INSERT Command Posted by Cecil Champenois @ 12/30/2008 8:42:32 PM
RE: INSERT Command Posted by Brad Schulz @ 12/30/2008 9:23:55 PM
RE: INSERT Command Posted by Cecil Champenois @ 12/30/2008 9:30:39 PM
RE: INSERT Command Posted by Mike Yearwood @ 12/31/2008 12:09:31 AM
RE: INSERT Command Posted by Jun Tangunan @ 12/31/2008 5:44:24 AM
RE: INSERT Command Posted by Anil Sharma @ 1/2/2009 8:01:15 AM
RE: INSERT Command Posted by Mike Yearwood @ 1/2/2009 4:30:51 PM
RE: INSERT Command Posted by Anil Sharma @ 1/3/2009 7:42:01 AM
RE: INSERT Command Posted by Cecil Champenois @ 1/3/2009 4:20:21 PM
RE: INSERT Command Posted by Anders Altberg @ 1/3/2009 8:26:09 PM
RE: INSERT Command Posted by Mike Yearwood @ 1/4/2009 4:23:23 AM
RE: INSERT Command Posted by Anders Altberg @ 1/2/2009 6:38:07 PM
RE: INSERT Command Posted by Pete Sass @ 1/2/2009 11:15:13 PM
RE: INSERT Command Posted by Samir Ibrahim @ 1/3/2009 2:47:33 PM
RE: INSERT Command Posted by Mike Yearwood @ 1/4/2009 4:24:56 AM
RE: INSERT Command Posted by Samir Ibrahim @ 1/5/2009 1:38:41 AM
RE: INSERT Command Posted by Mike Yearwood @ 1/5/2009 3:10:20 AM