Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Here is an easy one, table exists
Message
De
17/06/2003 13:37:57
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Here is an easy one, table exists
Divers
Thread ID:
00800885
Message ID:
00800885
Vues:
51
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.
Carole Shaw
Fred Hutchinson Cancer Research Center

Eagles may soar, but weasels don't get sucked into jet engines.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform