Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Evaluating a file's format before using it in a SELECT
Message
De
16/07/1998 12:31:41
Ernie Veniegas
Micro System Solutions, Inc.
Calistoga, Californie, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00118163
Message ID:
00118177
Vues:
22
>First you can test to see if the file even exists using the *file()* function. Use the textbox value and add ".DBF" to it for testing. Use can use *on error* to trap errors. Then, try to open the table. If all passes, then execute the query.

Thanks for the fast response, Mark. I already use FILE() to make sure the selected/specified table already exists and also test for a .DBF extension. But I hadn't thought of trying to USE the file before trying it in the select and messing with my framework's ON ERROR to intercept error 15. Okay, we'll give that a try. (I'm always nervous working AGAINST what the Framework wants to do.)

I had been playing with FOPEN(&TheirFile) and FREAD() and HEADER() to see if there wasn't something in the header of the file that I could evaluate ... come to think of it, I seem to recall an FPA article my Max Rubel on the subject ... I'll go look.

Thanks again.

(How are things in Dallas?)
Ernie Veniegas
Micro System Solutions
... sensible software by design
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform