Information générale
Catégorie:
Codage, syntaxe et commandes
That's a great way to deal with the USE command. But there are several other commands that can pop up the open dialog box (like ZAP, LOCATE, PACK, ...).
Unfortunately, I have inherited code that is failing on one of those commands. I thought it would be nice if I could have VFP error out, and this would help me locate the offending code.
But, as Eric and Ed pointed out, there appears to be no way to trap this condition. I can track this particular case down, but I was just hoping there was some VFP trick I was missing.
>We have coded a routine, which accepts the table name / alias as its parameter, checks among other things to ensure it is 'in use'. summary of this check is:
>
>if .not. used( m.lcParameter )
>
>select 0
>use ( m.lcParameter ) ;
>alias ( m.lcParameter ) ;
>Shared && may omit 'Shared' for cursor / temporary / data entry files
>
>endif
>
>IMHO this is not much overhead, to avoid looking 'stupid'
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