Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Here is an easy one, table exists
Message
 
 
À
17/06/2003 13:37:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00800885
Message ID:
00800888
Vues:
19
This message has been marked as a message which has helped to the initial question of the thread.
See INDBC() function. Then use REMOVE TABLE to remove the table from the DBC without deleting it from disk. DROP TABLE will delete it from disk.

>Hey, I am wanting to test for a table existing in a dbc. If it is already is there I want to remove it and replace it with a new table. What is the easiest command to do this with? I am not really worried about the replacement, just the testing for it to begin with.
>
>Thought about:
>
>llexists = !empty(dbgetprop(cdbfname,[table],[path]))
>
>But then I have to trap the error if it isn't there.
>
>----
>If I am going to do that I might as well do:
>
>remove table (cdbftable) recycle && or should I use delete?
>
>Then again I have to error trap in case it isn't already there.
>
>----
>Also thought about:
>
>copy stru exte to tempdbf
>sele 0
>use tempdbf
>loca for allt(field_name) = cdbfname
>llexist = found()
>
>But this seems cumbersome.
>
>In the back of my mind I have a feeling like there must be a nifty little command I am forgetting that would be simpler that any of these approaches.
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform