anyone succeeded using Zap() on a table?
Simple dbServer,
Code: Select all
METHOD kill() AS LOGIC
LOCAL oD AS Schicht
oD:=Schicht{}
oD:Flock()
oD:Zap()
oD:Commit()
RETURN
OK, changed my method call to:
Code: Select all
METHOD kill() AS LOGIC
USE "D:MiscTuKVN_VersionDATASchicht.dbf" EXCLUSIVE NEW
IF !NetErr()
// SET INDEX TO sales, branch, salesman
IF DbZap()
? "Zapped OK"
ELSE
? "Error detected during ZAP"
ENDIF
CLOSE "D:MiscTuKVN_VersionDATASchicht.dbf"
ELSE
? "Error detected when opening the file"
ENDIF
RETURN
Compiling, i get:
error XS9002: Parser: unexpected input '->' 772,3 _Tom_Shell.prg TomShellWindow:kill
Line 772 is the "close" call.
I'm totally blank on using "commands", but i doubt, this should be as is.
PS, looking into Helfp for DBServer, it seems, in the description part quite some line breaks where lost...