Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filter clear
Message
De
18/10/2004 13:15:14
John White
Micro-Oriented Software Techniques, Inc.
Phoenix, Arizona, États-Unis
 
 
À
17/10/2004 22:36:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00951906
Message ID:
00952342
Vues:
11
Just to toss in a small point to make life "interesting". I've seen some discussion in this thread about making sure variables have values and that objects don't go out of scope, etc. Maybe something small like the following to avoid any possible issue?
lcOldFilter = set('filter')
lnOldRecno = Recno()
lcBillno = Thisform.sometextobject.value
ldDateIn = Thisform.somedateobject.value
lcDateIn = '{^' + tran(year(m.ldDatein)) + '-' + tran(month(m.ldDatein)) + '-' + tran(day(m.ldDatein)) + '}'
lcFilter = 'BillNo = [' +  m.lcBillno + '] and Datein = ' + m.lcDatein

set filter to &lcFilter
locate
if eof()
    =messagebox('Oops, no matching records', 16, 'Uh-oh, problem encountered')
    set filter to &lcOldFilter
    if between(lnOldRecno,1,Reccount())
        go lnOldRecno
    endif
endif
Since there are no variables nor objects of any type in the FILTER statement, nothing to be tripped up by.

>hi,
>thank you very much,
>it works
>
>lcFilter = "BILLNO=" + Transform( m.lcBillNo) + " AND DATEIN=CTOD('" + DTOC( m.lcDateIn) + "')"
>
>best regards
>m.qasem
John White [MOST]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform