of_deleteall


pfcdwsrv.pbl   >   pfc_n_cst_dwsrv_rowmanager   >   of_deleteall   

Full name pfc_n_cst_dwsrv_rowmanager.of_deleteall
Access public
Extend of integer
Return value integer
Prototype public function integer of_deleteall()

Name Datatype
No Data

Name Datatype
li_confirm integer
ll_rowcount long

public function integer of_deleteall ();//////////////////////////////////////////////////////////////////////////////
//
//	Function:  of_DeleteAll
//
//	Access:  Public
//
//	Arguments:  none
//
//	Returns:  integer
//	Number of rows deleted
//	-1 = error
//
//	Description:  Deletes all rows from the primary buffer of the DW
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	5.0   Initial version
// 5.0.04 Corrected return value to return Number of rows deleted.
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996-1997 Sybase, Inc. and its subsidiaries.  All rights reserved.
//	Any distribution of the PowerBuilder Foundation Classes (PFC)
//	source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////

integer	li_confirm = 1
long		ll_rowcount

// Validate DW requestor
if IsNull(idw_requestor) Or not IsValid (idw_requestor) then
	return -1
end if

// Determine # of rows to be deleted
ll_rowcount = idw_requestor.RowCount()
if ll_rowcount <= 0 then
	return 0
end if

// Confirm deletion
if ib_confirmondelete then
	li_confirm = of_ConfirmDelete (ll_rowcount)
end if

// Delete all rows
if li_confirm = 1 then
	idw_requestor.RowsMove (1, ll_rowcount, primary!, idw_requestor, idw_requestor.DeletedCount() + 1, delete!)
	return ll_rowcount
end if

// No rows deleted.
return 0

end function

     
Name Owner
No Data

     
Name Owner
datawindow.deletedcount datawindow
datawindow.rowcount datawindow
datawindow.rowsmove datawindow
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
pfc_n_cst_dwsrv_rowmanager.of_confirmdelete pfc_n_cst_dwsrv_rowmanager

     
Full name
No Data

     
Name Scope
No Data