Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

addbobjects

Status
Not open for further replies.

channelmaster

Technical User
Dec 9, 2001
52
PH
how can I zap all table records using "=addbobjects" without zapping a particular table records. The scenario is this:

login.dbf
table1.dbf
table2.dbf
:
:
:
table10.dbf &&and so on
I want to zap all table records but retain the records of login.dbf

thanks
 
I'm a little confused with the argument "=addbobjects".

Is this some new command - Haven't upgraded to 7 yet - or are you confusing it with the add object clause in a class definition?

Or does some field in your table(s) have a value of "=addbobjects"?

Darrell
'We all must do the hard bits so when we get bit we know where to bite' :)
 
ChannelMaster

I have used FoxTools since FPW2.6 and I am unaware of a function called addobjects(). (
The only addobjects method that I know of allows you to add objects to a container. Like programmatically add a textboxe to a form. Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first or check this link
 
HI


** Zap All Tables in a directory
myPath = "C:\DATA"
myPath=ADDBS(myPath)

SET EXCLUSIVE ON
** SET SAFETY OFF && if you dont want to say YES/NO
LOCAL aFiles, nCount, I
DIMENSION aFiles(1,1)
nCount = ADIR(aFiles,myPath+"*.DBF")
I=1
FOR I = 1 TO nCount
IF "LOGIN" & UPPER(aFiles(i,1))
LOOP
ENDIF
SELECT 0
USE (aFiles(I,1))
ZAP
USE
ENDFOR
SET EXCLUSIVE OFF
**

:) ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Dear Mike and Darrel,
So sorry that I mispelled the function name, it is supposed to be ADBOBJECTS() and not addbobjects() as mentioned earlier. Anyway thanks for the response especially Ramani, I will try your code.

Rene
 
Dear Ramani, I tried using your code but there is an error on:
IF "LOGIN" & UPPER(aFiles(i,1))

thanks
 
Channelmaster,
Use this instead:

IF "LOGIN" $ UPPER(aFiles(i,1))

It's a minor typo from the Master Ramani. :)

Best Regards,
Scott

"Everything should be made as simple as possible, and no simpler."[hammer]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top