Re: How to requery grid based on query

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Wolfgang Schmale (w_schmale_at_wsnews.de)
Date: 02/09/04


Date: Tue, 10 Feb 2004 00:01:50 +0100

Hi Ook!

you will get the REQUERY() orportunity if you use a view instead of a query.
To create a View you must open a DataBaseContainer and the issue the
command:
Create sql View myView as select * from Customer where cCustomer="Friendly
Human"
Further information: A quote of the VFP-Helpfile
CREATE SQL VIEW Command
See Also
CREATE DATABASE | CREATE VIEW | DELETE VIEW | DISPLAY VIEWS | LIST VIEWS |
MODIFY VIEW | OPEN DATABASE | RENAME VIEW | SELECT - SQL | USE |
DBSETPROP( ) Function | DBGETPROP( ) Function
Displays the View Designer, allowing you to create a SQL view. Views are a
powerful means of providing customized access to selected portions of your
database, combining the flexibility of a query with the ability to update
data.
A SQL view allows you to extract specific fields and records from one or
more related tables and treat the resulting data set as a table that you can
update.
CREATE [SQL] VIEW [ViewName ] [REMOTE]
[CONNECTION ConnectionName [SHARE] | CONNECTION DataSourceName]
   [AS SQLSELECTStatement]

-- 
_________________
MFG
Wolfgang Schmale
MS Visual FoxPro MVP
--------------------------------
"Ook" <outlookexpress@nospam@embertsdotcom> schrieb im Newsbeitrag
news:OQBnZL17DHA.1636@TK2MSFTNGP12.phx.gbl...
> I have a grid. RecordSourceType is 4 - SQL Statement. Form runs, grid
> displays data. Question - if the base table is updated, how can I get the
> grid to also update? Unlike a listbox, a grid does not have a requery
> method. I can't run the query again, because it will dissasociate the grid
> from the cursor. I think I can just use a parameterized view and requery
the
> view (will that work?), but it would be nice if I could make it work as
is.
>
>


Relevant Pages

  • Re: VB.NET - How do I return an AutoNumber from an Insert Statement using the DataGridView
    ... > Thanks for that Bart, ... > the values from my Grid to the TableAdapters Insert method. ... >> choose add query, then choose insert query, use a query like below, ... >>> stored in the SQL Database but a VB generated (or disconected dataset ...
    (microsoft.public.dotnet.framework.adonet)
  • 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)
  • 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: What GROUP BY is not...
    ... And if you were running it against SQL Server, ... the same amount of time for both, according to Michel (and the query ... DISTINCT is for eliminating duplicates. ... skilled users learning how to use Group By on the QBE grid will be far more ...
    (microsoft.public.access.queries)
  • RE: Grid Query
    ... I have created the query with CREATE SQL VIEW. ... How can i get the resulted output of create sql view in the grid data. ...
    (microsoft.public.fox.programmer.exchange)