Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: bryan wetton
  Where is bryan wetton?
 Morphett Vale
 Australia
 bryan wetton
 Tags
Subject: RE: opening multiple tables in one routine
Thread ID: 209088 Message ID: 209397 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Sunday, December 28, 2008 10:26:40 AM         
   


> Thanks for suggested code Brad.
>
> The tables are being copied as you surmise.
>
> > Try changing the USED line so that it says:
> >
> >
IF USED(JUSTSTEM(lcNewFilename))

> >
>
> I cannot understand why the following code segment does not work
>
>
> 
> Set Default To (mydatapath) && the files to be opened are here
> 
> *  open dbf
> 
> 		mytable = Juststem(lcNewfilename )
> 
> 		mytablefull = (mytable)+'.dbf'
> 
> 		If File(mytablefull )
> 
> 			If Not Used(mytable)
> 
> 				Use (mytable) In 0 < ---  alias() in debugger does not change to this table
> 
> 			Endif
> 
> 		Endif
> 
> 

>
> Sorry to be so insistent but I am totally confused ...
>

"use myTable In 0" opens the table in the next unused work area - that is, not in the current one.
If you want to have it in the current work area, you can do it the other way around:

If Not Used(mytable)
    Select 0
    Use (mytable) 
Endif




hth
-Stefan

ENTIRE THREAD

opening multiple tables in one routine Posted by bryan wetton @ 12/24/2008 6:58:11 AM
RE: opening multiple tables in one routine Posted by Brad Schulz @ 12/24/2008 8:09:38 AM
RE: opening multiple tables in one routine Posted by bryan wetton @ 12/25/2008 8:29:48 AM
RE: opening multiple tables in one routine Posted by Brad Schulz @ 12/27/2008 6:59:58 PM
RE: opening multiple tables in one routine Posted by bryan wetton @ 12/28/2008 2:48:51 AM
RE: opening multiple tables in one routine Posted by Stefan Wuebbe @ 12/28/2008 10:26:40 AM
RE: opening multiple tables in one routine Posted by bryan wetton @ 12/29/2008 12:37:26 PM
RE: opening multiple tables in one routine Posted by Brad Schulz @ 12/29/2008 7:26:41 PM
RE: opening multiple tables in one routine Posted by Stefan Wuebbe @ 12/29/2008 7:40:52 PM
RE: opening multiple tables in one routine Posted by bryan wetton @ 12/30/2008 7:59:40 AM
RE: opening multiple tables in one routine Posted by bryan wetton @ 12/30/2008 7:53:24 AM
RE: opening multiple tables in one routine Posted by Stefan Wuebbe @ 12/29/2008 7:38:40 PM
RE: opening multiple tables in one routine Posted by Jyothish KV @ 12/24/2008 8:49:56 AM
RE: opening multiple tables in one routine Posted by Andy Kramek @ 12/24/2008 12:20:17 PM