wwbusiness::new

Creates a new oData member. Creates a PK value and sets any defaults coded in the New method.

Overload this method to set default values on the oData object properties.

*** Create new object
IF !DODEFAULT()
   RETURN .F.
ENDIF

*** Set default values
THIS.oData.FromName = "Unknown"
THIS.oData.SendTo = "All"
THIS.oData.ThreadId = SUBSTR(SYS(2015),2)
THIS.oData.MsgTime = DATETIME()

RETURN .T.


o.new()

Return Value

.T. or .F.

Remarks

The numeric PK that New() generates is not guaranteed to be sequential. wwBusiness generates a new PK on New() operation, but if the record is not saved the PK is thrown out and not returned to the pool. If you need sequential keys you can use CreateNewId() with a custom key name and manage that on your own.

See also:

Class wwbusiness


  Last Updated: 1/23/2005 | © West Wind Technologies, 2008