home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmOIP
- BorderStyle = 3 'Fixed Double
- Caption = "Employee Form"
- ClientHeight = 3585
- ClientLeft = 2055
- ClientTop = 2310
- ClientWidth = 6345
- Height = 4275
- Left = 1995
- LinkTopic = "Form1"
- ScaleHeight = 3585
- ScaleWidth = 6345
- Top = 1680
- Width = 6465
- Begin CommandButton cmdFirst
- Caption = "First"
- Height = 495
- Left = 240
- TabIndex = 8
- Top = 3000
- Width = 1215
- End
- Begin CommandButton cmdLast
- Caption = "Last"
- Height = 495
- Left = 4920
- TabIndex = 11
- Top = 3000
- Width = 1215
- End
- Begin CommandButton cmdNext
- Caption = "Next"
- Height = 495
- Left = 3600
- TabIndex = 10
- Top = 3000
- Width = 1215
- End
- Begin CommandButton cmdPrevious
- Caption = "Previous"
- Height = 495
- Left = 1560
- TabIndex = 9
- Top = 3000
- Width = 1215
- End
- Begin TextBox txtComm
- Height = 285
- Left = 2640
- TabIndex = 6
- Top = 2280
- Width = 1215
- End
- Begin TextBox txtDeptno
- Height = 285
- Left = 2640
- TabIndex = 7
- Top = 2640
- Width = 1215
- End
- Begin TextBox txtSal
- Height = 285
- Left = 2640
- TabIndex = 5
- Top = 1920
- Width = 1215
- End
- Begin TextBox txtHireDate
- Height = 285
- Left = 2640
- TabIndex = 4
- Top = 1560
- Width = 1215
- End
- Begin TextBox txtMgr
- Height = 285
- Left = 2640
- TabIndex = 3
- Top = 1200
- Width = 1215
- End
- Begin TextBox txtJob
- Height = 285
- Left = 2640
- TabIndex = 2
- Top = 840
- Width = 2895
- End
- Begin TextBox txtEname
- Height = 285
- Left = 2640
- TabIndex = 1
- Top = 480
- Width = 2895
- End
- Begin TextBox txtEmpno
- Height = 285
- Left = 2640
- TabIndex = 0
- Top = 120
- Width = 1215
- End
- Begin Label Label8
- Alignment = 1 'Right Justify
- AutoSize = -1 'True
- Caption = "Department Number:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 255
- Left = 360
- TabIndex = 19
- Top = 2640
- Width = 2175
- End
- Begin Label Label7
- Alignment = 1 'Right Justify
- AutoSize = -1 'True
- Caption = "Commission:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 255
- Left = 1200
- TabIndex = 18
- Top = 2280
- Width = 1335
- End
- Begin Label Label6
- Alignment = 1 'Right Justify
- AutoSize = -1 'True
- Caption = "Salary:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 255
- Left = 1680
- TabIndex = 17
- Top = 1920
- Width = 855
- End
- Begin Label Label5
- Alignment = 1 'Right Justify
- AutoSize = -1 'True
- Caption = "Hire Date:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 255
- Left = 1440
- TabIndex = 16
- Top = 1560
- Width = 1095
- End
- Begin Label Label4
- Alignment = 1 'Right Justify
- AutoSize = -1 'True
- Caption = "Manager:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 240
- Left = 1560
- TabIndex = 15
- Top = 1200
- Width = 990
- End
- Begin Label Label3
- Alignment = 1 'Right Justify
- AutoSize = -1 'True
- Caption = "Job:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 255
- Left = 2040
- TabIndex = 14
- Top = 840
- Width = 495
- End
- Begin Label Label2
- Alignment = 1 'Right Justify
- AutoSize = -1 'True
- Caption = "Employee Name:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 255
- Left = 720
- TabIndex = 13
- Top = 480
- Width = 1815
- End
- Begin Label Label1
- Alignment = 1 'Right Justify
- AutoSize = -1 'True
- Caption = "Employee Number:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 255
- Left = 480
- TabIndex = 12
- Top = 120
- Width = 2055
- End
- Begin Menu mExit
- Caption = "E&xit!"
- End
- Sub cmdFirst_Click ()
- EmpDynaset.DbMoveFirst
- If EmpDynaset.BOF = True Then
- MsgBox WarnFirstEmp$
- EmpDynaset.DbMoveFirst
- End If
- Call EmpRefresh
- End Sub
- Sub cmdLast_Click ()
- EmpDynaset.DbMoveLast
- If EmpDynaset.EOF = True Then
- MsgBox WarnLastEmp$
- EmpDynaset.DbMoveLast
- End If
- Call EmpRefresh
- End Sub
- Sub cmdNext_Click ()
- If EmpDynaset.EOF <> True Then
- EmpDynaset.DbMoveNext
- If EmpDynaset.EOF = True Then
- MsgBox WarnLastEmp$
- EmpDynaset.DbMoveLast
- End If
- End If
- Call EmpRefresh
- End Sub
- Sub cmdPrevious_Click ()
- If EmpDynaset.BOF <> True Then
- EmpDynaset.DbMovePrevious
- If EmpDynaset.BOF = True Then
- MsgBox WarnFirstEmp$
- EmpDynaset.DbMoveFirst
- End If
- End If
- Call EmpRefresh
- End Sub
- Sub EmpRefresh ()
- If EmpDynaset.BOF <> True And EmpDynaset.EOF <> True Then
- txtEmpno = EmpDynaset.Fields("empno").value
- txtEname = EmpDynaset.Fields("ename").value
- txtJob = EmpDynaset.Fields("job").value
- 'check if mgr=nul
- If Not IsNull(EmpDynaset.Fields("mgr").value) Then
- txtMgr = EmpDynaset.Fields("mgr").value
- Else
- txtMgr = ""
- End If
- txtHireDate = EmpDynaset.Fields("hiredate").value
- txtSal = EmpDynaset.Fields("sal").value
- '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
- Else
- txtEmpno = ""
- txtEname = ""
- txtJob = ""
- txtMgr = ""
- txtHireDate = ""
- txtSal = ""
- txtComm = ""
- txtDeptno = ""
- End If
- End Sub
- Sub Form_Load ()
- 'OraSession and OraDatabase are global
- Set OraSession = CreateObject("OracleInProcServer.XOraSession")
- Set OraDatabase = OraSession.OpenDatabase(DatabaseName$, Connect$, 0&)
- Set EmpDynaset = OraDatabase.DbCreateDynaset(EmpQuery$, 0&)
- Call EmpRefresh
- End Sub
- Sub mExit_Click ()
- End Sub
-