Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is table already open under diff alias?
Message
De
08/02/2010 13:36:23
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01448039
Message ID:
01448152
Vues:
42
>>>>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
>>>>
>>>
>>>Thank you, Gregory.
>>
>>
>>My pleasure.
>>
>>It returns the table name defined in the database - not the dbf() name
>>Returns the stem of the dbf in case of a free table,
>>
>>If it isn't useful now - it may be in the future
>>
>>And, my, ahem, secretary informs you that you have to add error handling - gr+d
>
>One more calling me a secretary and I will get seriously offended. You did update your original message - and you're so opposed to making changes in the message - in this case you changed the code.


Oh - and where did I write that you were my secretary ?
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform