Read AxDvgCOMUs.chm
IAxaptaRecord::Update
HRESULT Update(void);
Updates the Microsoft Axapta record; that is the record is transferred to the database.
Return Value
The return value obtained from the returned HRESULT is one of the following:
Return value
Meaning
S_OK
Success
E_FAIL
General failure
AXAPTA_E_NO_SECURITY_KEY
The security key for updating records through the Axapta Business Connector is disabled
AXAPTA_E_RECORD_NOT_VALID
Microsoft Axapta record is not valid. The IAxapta object has properly logged off (IAxapta::Logoff)
Comments
This method resembles calling the update member method of a record in the Microsoft Axapta X++ language.
Example (Visual Basic)
Dim Axapta As Object
Dim MyRecord As Object
Set Axapta = CreateObject("AxaptaCOMConnector.Axapta")
Axapta.Logon
‘ create an Axapta record
Set MyRecord = Axapta.CreateRecord("MyTable")
‘ select a record
MyRecord.ExecuteStmt "select * from %1 where %1.Name == ‘MyName’"
‘ set fields of record
MyRecord.Field("Name") = "MyNewName"
MyRecord.Field("Address") = "MyNewAddress"
‘ update the record
MyRecord.Update
|