Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Requery of view.
Message
 
 
À
16/07/2001 10:43:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00531001
Message ID:
00531017
Vues:
12
William,
As Yuri posted, you are rewriting the view. In order to do what you want, try the following syntax when creating it:
create sql view myTable connection bmsdsn remote AS ;
   select * from tranhdr where pendcds = ?pcPendCds ;
      and repaired = 0 AND valerror = 0
Now pcPendCds is configured as a view parameter and you should be able to change it a requery the view for different results.

Note: When you first opne the view, issue a use MyTable nodata. That way, the variable pcPendCds does not need to be defined. If you open the view with data and pcPendCds isn't available, VFP will display a dialog asking for the value of pcPendCds.

HTH.

>Maybe someone can help me. I am trying to requery a view. This is the problem. I have created a view as below:
>
>pcPendCds = '11'
>
>lcWhere = "pendcds = "+pcPendCds+" and repaired = 0 AND valerror = 0"
>
>create sql view myTable connection bmsdsn remote AS select * from tranhdr where &lcWhere
>
> As you can see I have a variable pendcds "Which I use to store my code"
>When the first view is create I get 67 records.
>
>I now want to get a different set of records so I do the following.
>
>Pendcds = '10' &&Reset for the code I want.
>lcWhere = "pendcds = "+pcPendCds+" and repaired = 0 AND valerror = 0"
>&& Reset my where condition to reflect the new codes.
>
>=REQUERY() && Requery to get a different record set.
>
> The problem is that my view still contains the last 67 records. The set should now contain 5 records with a code of '10'.
>
>What is wrong should't my view have been updated?
>HELP!!!
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform