Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is table already open under diff alias?
Message
 
 
À
08/02/2010 11:56:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01448039
Message ID:
01448085
Vues:
54
>>>Dmitry,
>>>
>>>Perhaps this function may be of help.
>>>
>>>Pass
>>>- nothing for current workarea
>>>- an alias name
>>>- a workarea
>>>
>>>
>>>UPDATE
>>>
>>>
>>>function	GetTableName(wa)
>>>	wa = evl( m.wa, select(0) )
>>>	
>>>	do case
>>>	case !used(m.wa)
>>>		return '???'
>>>		
>>>	case !empty(cursorgetprop('DataBase', m.wa))
>>>		return proper(cursorgetprop('SourceName', m.wa))
>>>	
>>>	otherwise
>>>		return Proper(juststem(dbf(m.wa)))
>>>	
>>>	endcase
>>>endfunc
>>>
>>
>>The error handling here is missing.
>
>
>So ?

So the code produced an error if you pass "Test" and don't have an alias test opened. BTW, I meant the code before your update.

With the latest update it should work OK.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform