Deletes a row from a DataWindow control, DataStore object, or child DataWindow.
integer dwcontrol.DeleteRow ( long row )
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control, DataStore, or child DataWindow. |
row |
A value identifying the row you want to delete. To delete the current row, specify 0 for row. |
Returns 1 if the row is successfully deleted and -1 if an error occurs. If any argument’s value is NULL, the method returns NULL. If there is no DataWindow object assigned to the DataWindow control or DataStore, this method returns -1.
DeleteRow deletes the row from the DataWindow’s primary buffer.
If the DataWindow is not updatable, all storage associated with the row is cleared. If the DataWindow is updatable, DeleteRow moves the row to the DataWindow’s delete buffer; PocketBuilder uses the values in the delete buffer to build the SQL DELETE statement.
The row is not deleted from the database table until the application calls the Update method. After the Update method has updated the database and the update flags are reset, the storage associated with the row is cleared.
This statement deletes the current row from dw_employee:
dw_employee.DeleteRow(0)
These statements delete row 5 from dw_employee and then update the database with the change:
dw_employee.DeleteRow(5)
dw_employee.Update()
Copyright © 2004. Sybase Inc. All rights reserved. |
![]() |