Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table not found
Message
De
15/07/2007 03:26:41
 
 
À
14/07/2007 08:41:00
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01240437
Message ID:
01240516
Vues:
11
hi,
thank you all very much,it works
>>hi all,
>>any idea , help
>>thanks.
>>
>>use "tax"+thisform.combo1.Value
>>
>>if !found() &&mean  "tax"+thisform.combo1.Value.dbf
>>   =messagebox("table not found")
>>else
>>.
>>.
>>endif
>>
>
>First, to make debugging and program maintenance easier, store the table name into a variable. It is awkward to use the same complicated expression several times in the same program. In this case, "tax" + ThisForm.Combo1.Value.
>
>Just in case the above is real code, a ComboBox should NOT be named "Combo1". You should give it a name like CboFilename, i.e., it should start with "Cbo", and then a meaningful name. For sample code, or for a quick test, "Combo1" is acceptable.
>
>To get the filename, make sure the .DBF extension is included, for example:
>
>
>lcFileName = DefaultExt(ThisForm.Combo1.Value, "dbf")
>
>
>Now, to find out if the filename actually exists, use one of the following:
>
>
>1.
>if file(lcFilename)
>
>2.
>if adir(laFileList, lcFileName) > 0
>
>
>Option (1) will return .T. if the file is found anywhere among the search path (see "set path"), or even in the EXE. Therefore, option (2) is usually deemed safer.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform