Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check DB For a table
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00795015
Message ID:
00795019
Vues:
11
Hi
You can use the DBC file ( since it is a table as any other vfp table ), and there you'll see your tables ( the objecttype field contains "Table" ).
If you cannot "USE" the DBC, then it's a little trickier. I would do something like this, assuming you are looking for a table named MyTable:
open database blabla
disp tables to test noconsole
AllTables = filetostr( "test.txt" )
if "MYTABLE"+".DBF" $ upper(AllTables)
   wait window "Table found in Database"
else
   wait window "Table does not exist"
endif
Just an idea...
Jaime


>Hi,
>
>Is there a way to programmatically check to see if a database contains a particular table? I want to be able to check to see if it's included in the DB and if not add it to the DB.
>
>Thanks,
>
>Dennis
Why do programs stop working correctly as soon as you leave the Fox?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform