Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
If a table name is a varible ,How to judge it be used()
Message
De
11/06/2002 11:48:08
 
 
À
11/06/2002 10:49:30
Michale Chen
Shijiazhuang ZhiYuan Crop.
Shijiazhuang, Chine
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00666937
Message ID:
00666962
Vues:
17
Hi Michale.

>public theyear ,themonth, tablename
>theyear=''2002''
>themonth=''06''
>tablename=''''
>
>tablename=allt(theyear)+''Äê''+allt(themonth)+''ÔÂ''
>if not used(tablename)
>....
>endif

As Chris pointed out, you need to assign an alias to the table when you open it. The problem is that the table name starts with a number (2002 in this example), which isn't a valid alias, so VFP will assign it an alias based on the workarea (such as W25). Instead, open the table like this:
IF NOT USED('MYTABLE')
  USE (TableName) ALIAS MYTABLE
ENDIF
Doug
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform