Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT boo boo
Message
De
11/11/2013 15:20:47
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP3
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01587788
Message ID:
01587796
Vues:
59
>>>Hi Gang!
>>>
>>>I am having a brain poopoo at the moment.
>>>
>>>I want to save my work area before going into some code that may or may not run.
>>>
>>>After the code is finished, I want to go back to my saved work area
>>>
>>>
>>>I started like this..
>>>
>>>
>>>lcRx_No = ''
>>>lnSelectedWorkArea = SELECT()
>>>IF NOT USED('rx_107')
>>>	USE IN 0 rx ALIAS rx_107 AGAIN 
>>>ENDIF
>>>SELECT rx_107
>>>IF This.m_seek(rx.rx_no,'rx_107','UPDATEDRX')
>>>	lcRx_No = ALLTRIM(STR(rx_107.rx_no))
>>>ENDIF 
>>>USE IN SELECT('rx_107')
>>>IF lnSelectedWorkArea > 0
>>>	SELECT &lnSelectedWorkArea
>>>ENDIF 
>>>
>>>
>>>It saves the work area ok in lnSelectedWorkArea
>>>
>>>but the SELECT &lnSelectedWorkArea gives an error "Command contains unrecognized phrase/keyword"
>>>
>>>
>>>So, what did I do wrong here? Thanks!!!
>>
>>Use instead
>>
>>select (m.lnSelectedWorkArea)
>>
>>And you don't have to test if it's >0 or not.
>
>Thanks!

Also, use lnSelectedWorkArea = SELECT( 0 ) rather than just SELECT( ) so you're not vulnerable to an unexpected value of SET COMPATIBLE.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform