home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmOraError
- BorderStyle = 3 'Fixed Double
- Caption = "VB*SQL Error"
- ClientHeight = 1440
- ClientLeft = 1740
- ClientTop = 5895
- ClientWidth = 6675
- Height = 1845
- Left = 1680
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 1440
- ScaleWidth = 6675
- Top = 5550
- Width = 6795
- Begin TextBox txtError
- Height = 1215
- Left = 720
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 2
- Top = 120
- Width = 4575
- End
- Begin CommandButton Help
- Caption = "Help"
- Height = 495
- Left = 5400
- TabIndex = 1
- Top = 720
- Width = 1215
- End
- Begin CommandButton OK
- Caption = "OK"
- Default = -1 'True
- Height = 495
- Left = 5400
- TabIndex = 0
- Top = 120
- Width = 1215
- End
- Begin Image Image1
- Height = 480
- Left = 120
- Picture = VBSOERR.FRX:0000
- Top = 360
- Width = 480
- End
- Option Explicit
- Sub Cancel_Click ()
- OraSession.LastServerErrReset
- Unload frmOraError
- End Sub
- Sub Form_Load ()
- Call CenterForm(frmOraError)
- txtError = ""
- 'If I get an error on login, the database object won't
- 'be created yet.
- On Error GoTo nodb
- If OraDatabase.LastServerErr <> 0 Then
- App.HelpFile = "ORA.HLP"
- txtError = txtError & OraDatabase.LastServerErrText
- frmOraError.HelpContextID = OraDatabase.LastServerErr
- End If
- If OraSession.LastServerErr <> 0 Then
- App.HelpFile = "ORA.HLP"
- txtError = txtError & OraSession.LastServerErrText
- frmOraError.HelpContextID = OraSession.LastServerErr
- End If
- If OraSession.LastServerErr = 0 And OraDatabase.LastServerErr = 0 Then
- txtError = "VB:" & Trim$(Str$(Err)) & " - " & Error$
- End If
- Exit Sub
- nodb:
- If OraSession.LastServerErr <> 0 Then
- App.HelpFile = "ORA.HLP"
- txtError = txtError & OraSession.LastServerErrText
- frmOraError.HelpContextID = OraSession.LastServerErr
- Else
- txtError = "VB:" & Trim$(Str$(Err)) & " - " & Error$
- End If
- Exit Sub
- End Sub
- Sub Help_Click ()
- 'Send an F1 to the app which will cause the help file
- 'listed in the project options to be opened.
- SendKeys "{F1}"
- End Sub
- Sub OK_Click ()
- App.HelpFile = ""
- Unload frmOraError
- End Sub
-