home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1996 February
/
PCWK0296.iso
/
po7_win
/
object10
/
quologin.frm
< prev
next >
Wrap
Text File
|
1994-11-30
|
4KB
|
147 lines
VERSION 2.00
Begin Form frmOraLogin
BorderStyle = 3 'Fixed Double
Caption = "Quote Login"
ClientHeight = 2430
ClientLeft = 660
ClientTop = 1515
ClientWidth = 4050
Height = 2835
Left = 600
LinkTopic = "Form4"
ScaleHeight = 2430
ScaleWidth = 4050
Top = 1170
Width = 4170
Begin CommandButton cmdCancel
Caption = "Cancel"
Height = 495
Left = 2280
TabIndex = 4
Top = 1680
Width = 1215
End
Begin CommandButton cmdOK
Caption = "OK"
Default = -1 'True
Height = 495
Left = 480
TabIndex = 3
Top = 1680
Width = 1215
End
Begin TextBox txtDatabaseName
Height = 285
Left = 1440
TabIndex = 2
Text = "ExampleDb"
Top = 1200
Width = 2295
End
Begin TextBox txtPassword
Height = 285
Left = 1440
PasswordChar = "*"
TabIndex = 1
Text = "tiger"
Top = 720
Width = 2295
End
Begin TextBox txtUserName
Height = 285
Left = 1440
TabIndex = 0
Text = "Scott"
Top = 240
Width = 2295
End
Begin Label Label3
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Database"
Height = 195
Left = 480
TabIndex = 7
Top = 1200
Width = 825
End
Begin Label Label2
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Password:"
Height = 195
Left = 480
TabIndex = 6
Top = 720
Width = 885
End
Begin Label Label1
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "User Name:"
Height = 195
Left = 360
TabIndex = 5
Top = 240
Width = 1005
End
End
Option Explicit
Sub cmdCancel_Click ()
Unload frmOraLogin
End
End Sub
Sub cmdOK_Click ()
If txtUserName.Text <> "" Then
UserName$ = txtUserName.Text
Password$ = txtPassword.Text
DatabaseName$ = txtDatabaseName.Text
Connect$ = UserName$ + "/" + Password$
On Error GoTo NoOraConnection
'Session and Database are declared global in quote.bas
Set OraSession = CreateObject("OracleInProcServer.XOraSession")
Set OraDatabase = OraSession.OpenDatabase(DatabaseName$, Connect$, 0&)
frmOraLogin.Hide
frmQuote.Show
End If
Exit Sub
NoOraConnection:
frmOraError.Show MODAL
End
End Sub
Sub Form_Load ()
CenterForm frmOraLogin
End Sub
Sub txtDatabaseName_GotFocus ()
txtDatabaseName.SelStart = 0
txtDatabaseName.SelLength = Len(txtDatabaseName.Text)
End Sub
Sub txtPassword_GotFocus ()
txtPassword.SelStart = 0
txtPassword.SelLength = Len(txtPassword.Text)
End Sub
Sub txtUsername_GotFocus ()
txtUserName.SelStart = 0
txtUserName.SelLength = Len(txtUserName.Text)
End Sub