Re: Application closes my temporary table Automatically.

From: Dan Freeman (spam_at_microsoft.com)
Date: 08/18/04


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
dbf?

Dan



Relevant Pages

  • Re: Application closes my temporary table Automatically.
    ... Thanks I will try the workarea stuff. ... sort of speak... ... LOL ... >> TEMPTABLE is closed for some reson when I run the CREATE SQL VIEW on ...
    (microsoft.public.fox.vfp.dbc)
  • Re: Column Heads
    ... to change my listbox rowsource from one stored procedure ... It's when I have both SQL ... >Private Sub Command2_Click ... >> and its AfterUpdate event fires to requery the listbox. ...
    (microsoft.public.access.formscoding)
  • Re: How to requery grid based on query
    ... you will get the REQUERY() orportunity if you use a view instead of a query. ... CREATE SQL VIEW Command ... Form runs, grid> displays data. ... a grid does not have a requery> method. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Slow requery... When done?
    ... Common causes of a query being slow are, insufficient indexes, and/or, ... Maybe show us the SQL? ... > before the requery is completed, ... How about a progress meter? ...
    (microsoft.public.access.forms)
  • Re: How to requery grid based on query
    ... allowing you to create a SQL view. ... combining the flexibility of a query with the ability to update ... a grid does not have a requery ...
    (microsoft.public.fox.programmer.exchange)