Skip Headers

Oracle® Objects for OLE Developer's Guide
10g Release 1 (10.1)

Part Number B10118-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Feedback

Update_Dynaset_Fields() Function

The commit event procedure calls this function after putting the dynaset in either Edit or AddNew mode. Update_Dynaset_Fields() sets the dynaset fields to the values entered in the text boxes. The function returns TRUE if successful, FALSE on an error.

Function UpdateDynasetFields() As Integer

'This function sets the dynaset field value to those

'entered in the text boxes. The function returns true

'on success, false on error.

ErrMsg = ""

On Error GoTo err_updatedynasetfields

EmpDynaset.Fields("empno").Value = txtEmpno

EmpDynaset.Fields("ename").Value = txtEname

EmpDynaset.Fields("job").Value = txtJob

EmpDynaset.Fields("mgr").Value = txtManager

EmpDynaset.Fields("hiredate").Value = txtHireDate

EmpDynaset.Fields("sal").Value = txtSal

EmpDynaset.Fields("comm").Value = txtComm

EmpDynaset.Fields("deptno").Value = txtDeptno

UpdateDynasetFields = True

Exit Function

err_updatedynasetfields:

If ErrMsg <> "" Then

MsgBox ErrMsg

Else

MsgBox Error$

End If

UpdateDynasetFields = False