General information
Category:
Coding, syntax & commands
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'
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only