home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / po7_win / object10 / quologin.frm < prev    next >
Text File  |  1994-11-30  |  4KB  |  147 lines

  1. VERSION 2.00
  2. Begin Form frmOraLogin 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "Quote Login"
  5.    ClientHeight    =   2430
  6.    ClientLeft      =   660
  7.    ClientTop       =   1515
  8.    ClientWidth     =   4050
  9.    Height          =   2835
  10.    Left            =   600
  11.    LinkTopic       =   "Form4"
  12.    ScaleHeight     =   2430
  13.    ScaleWidth      =   4050
  14.    Top             =   1170
  15.    Width           =   4170
  16.    Begin CommandButton cmdCancel 
  17.       Caption         =   "Cancel"
  18.       Height          =   495
  19.       Left            =   2280
  20.       TabIndex        =   4
  21.       Top             =   1680
  22.       Width           =   1215
  23.    End
  24.    Begin CommandButton cmdOK 
  25.       Caption         =   "OK"
  26.       Default         =   -1  'True
  27.       Height          =   495
  28.       Left            =   480
  29.       TabIndex        =   3
  30.       Top             =   1680
  31.       Width           =   1215
  32.    End
  33.    Begin TextBox txtDatabaseName 
  34.       Height          =   285
  35.       Left            =   1440
  36.       TabIndex        =   2
  37.       Text            =   "ExampleDb"
  38.       Top             =   1200
  39.       Width           =   2295
  40.    End
  41.    Begin TextBox txtPassword 
  42.       Height          =   285
  43.       Left            =   1440
  44.       PasswordChar    =   "*"
  45.       TabIndex        =   1
  46.       Text            =   "tiger"
  47.       Top             =   720
  48.       Width           =   2295
  49.    End
  50.    Begin TextBox txtUserName 
  51.       Height          =   285
  52.       Left            =   1440
  53.       TabIndex        =   0
  54.       Text            =   "Scott"
  55.       Top             =   240
  56.       Width           =   2295
  57.    End
  58.    Begin Label Label3 
  59.       Alignment       =   1  'Right Justify
  60.       AutoSize        =   -1  'True
  61.       Caption         =   "Database"
  62.       Height          =   195
  63.       Left            =   480
  64.       TabIndex        =   7
  65.       Top             =   1200
  66.       Width           =   825
  67.    End
  68.    Begin Label Label2 
  69.       Alignment       =   1  'Right Justify
  70.       AutoSize        =   -1  'True
  71.       Caption         =   "Password:"
  72.       Height          =   195
  73.       Left            =   480
  74.       TabIndex        =   6
  75.       Top             =   720
  76.       Width           =   885
  77.    End
  78.    Begin Label Label1 
  79.       Alignment       =   1  'Right Justify
  80.       AutoSize        =   -1  'True
  81.       Caption         =   "User Name:"
  82.       Height          =   195
  83.       Left            =   360
  84.       TabIndex        =   5
  85.       Top             =   240
  86.       Width           =   1005
  87.    End
  88. End
  89. Option Explicit
  90.  
  91. Sub cmdCancel_Click ()
  92.  Unload frmOraLogin
  93.  End
  94. End Sub
  95.  
  96. Sub cmdOK_Click ()
  97.  
  98.  If txtUserName.Text <> "" Then
  99.   UserName$ = txtUserName.Text
  100.   Password$ = txtPassword.Text
  101.   DatabaseName$ = txtDatabaseName.Text
  102.   Connect$ = UserName$ + "/" + Password$
  103.  
  104.   On Error GoTo NoOraConnection
  105.  'Session and Database are declared global in quote.bas
  106.   Set OraSession = CreateObject("OracleInProcServer.XOraSession")
  107.   Set OraDatabase = OraSession.OpenDatabase(DatabaseName$, Connect$, 0&)
  108.  
  109.   frmOraLogin.Hide
  110.   frmQuote.Show
  111.  End If
  112.  
  113. Exit Sub
  114. NoOraConnection:
  115.  frmOraError.Show MODAL
  116.  End
  117.  
  118. End Sub
  119.  
  120. Sub Form_Load ()
  121.  
  122.  CenterForm frmOraLogin
  123.  
  124. End Sub
  125.  
  126. Sub txtDatabaseName_GotFocus ()
  127.  
  128.  txtDatabaseName.SelStart = 0
  129.  txtDatabaseName.SelLength = Len(txtDatabaseName.Text)
  130.  
  131. End Sub
  132.  
  133. Sub txtPassword_GotFocus ()
  134.  
  135.  txtPassword.SelStart = 0
  136.  txtPassword.SelLength = Len(txtPassword.Text)
  137.  
  138. End Sub
  139.  
  140. Sub txtUsername_GotFocus ()
  141.  
  142.  txtUserName.SelStart = 0
  143.  txtUserName.SelLength = Len(txtUserName.Text)
  144.  
  145. End Sub
  146.  
  147.