|
of_addtologfile
|
|
Full name
|
pfc_n_cst_sqlspy.of_addtologfile
|
Access
|
protected
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
protected function integer of_addtologfile(string)
|
Name
|
Datatype
|
li_filenumber
|
integer
|
protected function integer of_addtologfile (string as_newentry);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_AddTologfile
//
// Access: protected
//
// Arguments:
// as_newentry The new entry to be added to the logfile.
//
// Returns: integer
// 1 if it succeeds.
// -1 if an error occurs.
//
// Description: Add a history entry into the RichTextControl.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.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.
//
//////////////////////////////////////////////////////////////////////////////
integer li_filenumber
//Check parameters
If IsNull(as_newentry) Then
Return -1
End If
//Check there is a log filename or
//that there is a new entry
If Len(is_logfile) = 0 or &
Len(as_newentry) = 0 Then
Return 0
End If
If FileExists (is_logfile) Then
//Existing logfile has been found
End If
//Append the new entry to the logfile
SetPointer (HourGlass!)
li_filenumber = FileOpen(is_logfile, StreamMode!, Write!, LockWrite!, Append!)
If li_filenumber > 0 Then
FileWrite (li_filenumber, as_newentry)
FileClose (li_filenumber)
End If
Return 1
end function
Name
|
Owner
|
systemfunctions.fileclose |
systemfunctions
|
systemfunctions.fileexists |
systemfunctions
|
systemfunctions.fileopen |
systemfunctions
|
systemfunctions.filewrite |
systemfunctions
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.len |
systemfunctions
|
systemfunctions.setpointer |
systemfunctions
|