Oracle Objects for OLE Release 9.2 Part Number A95895-01 |
|
Our EmpRefresh() subroutine looks like:
Private Sub EmpRefresh()
'check if the current dynaset row is valid
If EmpDynaset.BOF <> True And EmpDynaset.EOF <> True Then
txtEmpno = EmpDynaset.Fields("empno").Value
' we can't display nulls, so display "" for NULL fields
If Not IsNull(EmpDynaset.Fields("ename").Value) Then
txtEname = EmpDynaset.Fields("ename").Value
Else
txtEname = ""
End If
If Not IsNull(EmpDynaset.Fields("job").Value) Then
txtJob = EmpDynaset.Fields("job").Value
Else
txtJob = ""
End If
'check if mgr=nul
If Not IsNull(EmpDynaset.Fields("mgr").Value) Then
txtMgr = EmpDynaset.Fields("mgr").Value
Else
txtMgr = ""
End If
If Not IsNull(EmpDynaset.Fields("hiredate").Value) Then
txtHireDate = EmpDynaset.Fields("hiredate").Value
Else
txtHireDate = ""
End If
If Not IsNull(EmpDynaset.Fields("hiredate").Value) Then
txtSal = EmpDynaset.Fields("sal").Value
Else
txtSal = ""
End If
'check if comm=nul
If Not IsNull(EmpDynaset.Fields("comm").Value) Then
txtComm = EmpDynaset.Fields("comm").Value
Else
txtComm = ""
End If
txtDeptno = EmpDynaset.Fields("deptno").Value
'if the current dynaset row is invalid, display nothing
Else
txtEmpno = ""
txtEname = ""
txtJob = ""
txtMgr = ""
txtHireDate = ""
txtSal = ""
txtComm = ""
txtDeptno = ""
End If
End Sub
|
Copyright © 1994, 2002 Oracle Corporation. All Rights Reserved. |
|