main logo
Subject: RE: Simple Question
Author: "Cindy Winegarden"
Posted: 2004/04/30 18:25:48
 
View Entire Thread
New Search


Catherine,

One more comment - USE IN Alias will throw an error if Alias is not open. A
really safe way to close tables is

Use In Select("Alias")

What this does is selects an empty work area if there is no table/cursor
named Alias open at the time, which won't throw an error, and if Alias is
open then it will be closed.

Of course, you "know" your table is open but good programming practice
suggests that we should never assume anything and we should program to avoid
errors or handle them gracefully.


Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy.winegarden (at) mvps DO.T org


-----Original Message-----
From: profoxtech-bounces@leafe.com [mailto:profoxtech-bounces (at) leafe DO.T com] On
Behalf Of Garrett Fitzgerald
Sent: Friday, April 30, 2004 3:36 PM
To: profoxtech@leafe.com
Subject: Re: Simple Question

On Fri, 30 Apr 2004 15:32:30 -0400, Hines, Catherine
<catherine.hines (at) lmco DO.T com> wrote:
> I want to close the table after it's been updated,
> upon exit from my form, but I don't want to close all tables, just that
> one. CLOSE doesn't support one table at a time (and why not, I wonder).
> What's the command to close one table?

USE IN alias
or

SELECT alias
USE




 
©2004 Cindy Winegarden
<-- Prior Message New Search Next Message -->