Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: alan shulman
  Where is alan shulman?
 utica
 New York - United States
 alan shulman
 To: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 Tags
Subject: RE: Closing table issue in form
Thread ID: 289145 Message ID: 289162 # Views: 27 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Tuesday, December 28, 2010 8:34:32 PM         
   


> > Ok, so I need to establish a workarea and alias for the table I'm seeking?
>
> In FoxPro, any open table, cursor, view, CurorAdapter has an alias name which is the synonym for a work-area.
> So you do not need to establish it explicitly, it's already there.
>
>
> > Like, in my init for the main form I would say something like "use 'valanntable' IN 1 INDEX 'valanntable' ALIAS val", then "if not seek(m.y, 'val', 'valanntable)"?
> >
>
> Yes, the Alias clause of the Use command determines the name, so the second parameter of Seek() is right.
> The third parameter is the name of one of many index tags that you created in the yourtable.CDX file
>
>
> > Also, I thought the "use in 0" would close the 'int' table because I did not name the table. How would I close that table otherwise? Do I want to say 'close tables'?
> >
>
>
> Use In int
> && or, since that alias was the currently selected one in the code you posted previously, just 
> Use
> 

>
>
>
> hth
> -Stefan


Something is very wrong now. I have this now and I'm getting an error on my "seek y" in the following code:

y=thisform.combo1.value
use 'valanntable' IN 1 INDEX 'valanntable' ALIAS val
SELECT val
SEEK y
if not seek(y, val, valanntable)
MESSAGEBOX("POLICY NOT FOUND")
ENDIF

thisform.refresh


The error says that no index order is set. Again, this appears in my "seek" method that is called in the interactivechange event of the combo

ENTIRE THREAD

Closing table issue in form Posted by alan shulman @ 12/28/2010 5:49:38 PM
RE: Closing table issue in form Posted by Stefan Wuebbe @ 12/28/2010 6:31:21 PM
RE: Closing table issue in form Posted by alan shulman @ 12/28/2010 7:49:22 PM
RE: Closing table issue in form Posted by Stefan Wuebbe @ 12/28/2010 8:07:25 PM
RE: Closing table issue in form Posted by alan shulman @ 12/28/2010 8:34:32 PM
RE: Closing table issue in form Posted by Ilya Rabyy @ 12/28/2010 10:28:10 PM
RE: Closing table issue in form Posted by Stefan Wuebbe @ 12/29/2010 1:46:25 PM
RE: Closing table issue in form Posted by Ilya Rabyy @ 12/28/2010 8:16:16 PM