Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File in use
Message
De
31/07/2003 14:08:01
 
 
À
31/07/2003 13:42:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00815491
Message ID:
00815537
Vues:
11
>i want to know if they exist another solution because i have a lot to change like this

About the only way I can think of so you don't have to change all your "USE" statments would be to use an ON ERROR statement passing the error() and message() parameters. If Error() is 24, you could parse out the < name > from Message() and then do the same sort of code - ie - just do the select.
On Error do CatchError with Error(), Message(), Message(1), Program(), LineNo()

Procedure CatchError(tnErrorNo, tcMessage, tcMessage1, tcProgram, tnLineNo
Local lcOnError, lcAlias

   lcOnError = On("Error")
   ON ERROR

   If tnErrorNo = 24
      Alltrim(lcAlias) = Substr(tcMessage, 1, At(" ", Message()))
      Select (lcAlias)
      Resume Next
   endif

   ** other error code for other errors
   ** ditto ditto

   On Error &lcOnError

Return
It might work ;)

Alan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform