William --
Yuri is right. If you use macro substitution in a view, the "substitution" is created when you create and save the view, not during runtime where that macro substituted variable might change. So, you don't get a lot of value out of macro sub in views.
Jay
>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!!!
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement