Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table not found
Message
From
15/07/2007 03:26:41
 
 
To
14/07/2007 08:41:00
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01240437
Message ID:
01240516
Views:
10
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform