Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: tushar Kanvinde
  Where is tushar Kanvinde?
 Kolhapur, Maharastra
 India
 tushar Kanvinde
 To: Yahya Abou dalal
  Where is Yahya Abou dalal?
 tripoli
 Lebanon
 Yahya Abou dalal
 Tags
Subject: RE: indexes order change in cdx
Thread ID: 209254 Message ID: 209277 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Friday, December 26, 2008 4:18:36 PM         
   


> > Hi Yahia,
> >
> > Perhaps the only way is to delete the index tags and recreate them in desired order. Why do you want to do so?
> >
> >
> > -Stefan
> I have an old lookup routine (called from get valid ) whick open a browse window of a table ordered by code of an item or it's name.the routine pass 1 for code and 2 for name as the order to be set.now this routine don't work as expected because the order of indexes is changed when I upgraded my application to vfp(don't know why),so order 1 is not for code and 2 is not for name.
> the routine is called like this:
> @ x,y say '.......' get mvar valid P_SEEK(mphys,"phys",1,"mphys","code","name1",4,28,4,40)
> the first 1 in parameters is the order
> I used this routine extensivly in my application and don't want to rewrite everything
> So if I can rearrange my indexes so bycode is 1 and byname is 2 my routine works perfectly
> thanks

Since you are using a defined function P_SEEK you could wrap it around with a meta data file. In that you would have TableName, TagNumber, TagName. Then instead of setting the tag to the tag number, you could look up the table for the TagName and set the tag to the name instead.

Regards
Tushar

ENTIRE THREAD

indexes order change in cdx Posted by YAHIA ABOUDALAL @ 12/26/2008 12:37:22 PM
RE: indexes order change in cdx Posted by tushar @ 12/26/2008 1:03:21 PM
RE: indexes order change in cdx Posted by Stefan Wuebbe @ 12/26/2008 1:06:23 PM
RE: indexes order change in cdx Posted by YAHIA ABOUDALAL @ 12/26/2008 2:48:33 PM
RE: indexes order change in cdx Posted by Andy Kramek @ 12/26/2008 3:21:33 PM
RE: indexes order change in cdx Posted by YAHIA ABOUDALAL @ 12/27/2008 2:19:41 PM
RE: indexes order change in cdx Posted by tushar @ 12/26/2008 4:18:36 PM