contents   index   previous   next



Cursor deleteRow()

syntax:

cursor.deleteRow()

return:

number - 0 if the call was successful; otherwise, a nonzero status code based on the error message produced by the database. If the method returns a nonzero status code, use the associated Database's majorErrorCode and majorErrorMessage methods to interpret the meaning of the error.

 

description:

This function, only available on up datable cursors, deletes the current row from the Database object.

 

see:

#link <sedbc>, Database commitTransaction(), Database rollbackTransaction()

 

example:

// assume 'database' is a valid Database object

var curs = database.table("customer");

 

// delete all rows from the Database

// where City is "Malden"

while (curs.next())

{

  if(curs.City == "Malden")

    err = curs.deleteRow();

}

database.commitTransaction();

 


Cursor first()