|
of_dberror
|
|
Full name
|
pfc_n_cst_luw.of_dberror
|
Access
|
protected
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
protected function integer of_dberror(n_cst_dberrorattrib)
|
Name
|
Datatype
|
lnv_dberrorattrib
|
n_cst_dberrorattrib
|
protected function integer of_dberror (n_cst_dberrorattrib anv_dberrorattrib);//////////////////////////////////////////////////////////////////////////////
//
// Event:
// of_dberror
//
// Access: protected
//
// Arguments:
// as_error The error message.
//
// Returns: integer
// 1 = success
// -1 = error
//
// Description:
// Display the dberror that was encountered during the save process.
//
// Note: Triggered by the of_save when the update failed, after the appropriate
// end transaction process (which if appropriate should include rollback process)
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 6.0 Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
// 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.
//
//////////////////////////////////////////////////////////////////////////////
n_cst_dberrorattrib lnv_dberrorattrib
If IsNull(anv_dberrorattrib) Or Not IsValid(anv_dberrorattrib) Then
Return -1
End If
// Display the message.
of_Messagebox ('pfc_luw_dberror','Save', anv_dberrorattrib.is_errormsg, &
StopSign!, Ok!, 1)
// Clear the error message variable.
of_SetDBErrorMsg(lnv_dberrorattrib)
// If requested use the assist funtionality.
If ib_assist Then
of_Assist(is_instancename+'.of_dberror() displayed the error.')
End If
Return 1
end function