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