Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
More questions about views
Message
 
 
À
29/12/1999 09:21:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxExpress
Divers
Thread ID:
00309797
Message ID:
00309814
Vues:
25
I think we have lost something in the translation here. Could you go to the View Designer, click on the SQL button to display the generated SQL? Then drag the mouse over the WHERE clause and hit Ctrl+C then come back here and paste it in a reply.

For now, what I can see is you need some parentheses. I also would not reference another field in another table the way you have in the filter:
where some_criteria AND ;
   [Table.cMyField = ?cOtherField OR ;
    Table.cMyField LIKE "%" OR ;
    Table.cMyField = ""]
Because you have cMyField LIKE "%", you have just qualified all records regardless of the value [or emptiness] of cMyField. Therefore, you can eliminate the entire part of the where clause in the brackets above.

If you need cOtherField, you should parameterize your view:

cOtherField = trim(OtherTable.cOtherField)
requery("MyView")


>So now the filter of the view will look somehting like the following in the view designer:
>
>Field Name NOT Criteria Example Case Logic
>.
>.
>.
>.
>. AND
>Table.cMyField = OtherTable.cOtherTable OR
>Table.cMyField LIKE "%" OR
>Table.cMyField = ""
>
>When I run the view, I would expect to see some records in the browse window where cMyField is Blank or Empty, but I don't!
>
>What can I do to solve this
>
>Thank You
>
>Gary Hagerty
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform