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!

Table Empty Code

Status
Not open for further replies.

bobsmallwood

Programmer
Aug 9, 2001
38
US
What code could I put on a button that would empty the contents of a table?
 
You can easily do this with a table or tcursor variable, here is an example of how to use a table variable.

var
tblName String
tblVar Table
endVar
tblName = "Scratch.db"

tblVar.attach(tblName)
if isTable(tblName) then
if msgQuestion("Empty?", "Empty " + tblName + " ?") = "Yes" then

if tblVar.empty() then
message("All " + tblName + " records have been deleted.")
else
errorShow()
endIf

endIf
else
errorShow()
endIf



Perrin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top