Hi all,
I have a table which holds a field called "GRADE". I want to delete all rows in the table with a grade "DUMMY".
I have tried to use the code below which I adapted from a script that delets all blank rows in the table but it doesn't seem to work in this instance.
method run(var eventInfo Event)
var
matGrade tCursor
searchName string
endvar
;// Delete dummy grades
;//
searchName = "DUMMY"
matGrade.open("artManartReport.db"
matGrade.edit()
if matGrade.locate("GRADE", searchName) then
if matGrade."GRADE" = "DUMMY" then
matGrade.deleteRecord() ; delete the active record
message(searchName + " deleted"
endIf
endIf
endmethod
Has anyone got any ideas upon either where I'm going wrong or a different way of approaching the problem?
Thanks,
Woody.
I have a table which holds a field called "GRADE". I want to delete all rows in the table with a grade "DUMMY".
I have tried to use the code below which I adapted from a script that delets all blank rows in the table but it doesn't seem to work in this instance.
method run(var eventInfo Event)
var
matGrade tCursor
searchName string
endvar
;// Delete dummy grades
;//
searchName = "DUMMY"
matGrade.open("artManartReport.db"
matGrade.edit()
if matGrade.locate("GRADE", searchName) then
if matGrade."GRADE" = "DUMMY" then
matGrade.deleteRecord() ; delete the active record
message(searchName + " deleted"
endIf
endIf
endmethod
Has anyone got any ideas upon either where I'm going wrong or a different way of approaching the problem?
Thanks,
Woody.