Oracle Objects for OLE Release 9.2 Part Number A95895-01 |
|
Private Sub Commit_Click()
Dim DupDyn As Object
Dim DupDynQry As String
On Error GoTo err_commit
ErrMsg = ""
'Do validation checks on entered data
If DoValidationChecks Then 'If validation checks have passed
'If we are adding a record use DbAddNew
If DoAdd = True Then
EmpDynaset.AddNew
End If
'If we are updating a record use DbEdit
If DoUpdate = True Then
EmpDynaset.Edit
End If
'Update the dynaset fields and then update database if there is
'no error.
If UpdateDynasetFields Then
EmpDynaset.Update
End If
SetAfterCommitFlags
End If 'Endif for DoValidationChecks
Exit Sub
err_commit:
If ErrMsg <> "" Then
MsgBox ErrMsg
Else
MsgBox Error$
End If
End Sub
|
Copyright © 1994, 2002 Oracle Corporation. All Rights Reserved. |
|