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.