Re: Application closes my temporary table Automatically.
From: Dan Freeman (spam_at_microsoft.com)
Date: Wed, 18 Aug 2004 15:26:27 -0700
Juan Alonso wrote:
> Hey Lee.
> Thanks again for your help. The ReQuery() works fine, but my
> TEMPTABLE is closed for some reson when I run the CREATE SQL VIEW on
> another file. I don't understand. Here is a question.
> Does VFP8 FORMS close any open tables that are not in a DBC
> automatically when you open the form, or does this happen only when
> you run "ANY" CREATE SQL VIEW ???
> It seems when I do the CREATE SQL VIEW for my customer records, it
> closes out the table I opened before I ran the CREATE SQL VIEW.
Any time you open a cursor (table, view, whatever), it uses a "workarea". If
a table is already open in the current workarea and you open another, the
first automatically closes.
Before your CREATE SQL VIEW, issue SELECT 0 which will put you in the first
available unused workarea.
I really doubt, however, that you really want CREATE SQL VIEW. You know of
course that once created, you can simply USE TheView just as if it were a