⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frm_oracle_set.frm

📁 oracle和sql自动备份系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Frm_oracle_set 
   Caption         =   "设置数据库备份的向导"
   ClientHeight    =   4395
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5475
   Icon            =   "Frm_oracle_set.frx":0000
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   ScaleHeight     =   4395
   ScaleWidth      =   5475
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton cmdNav 
      Caption         =   "上一步(&N)"
      Height          =   312
      Index           =   2
      Left            =   2280
      MaskColor       =   &H00000000&
      TabIndex        =   12
      Tag             =   "103"
      Top             =   3840
      Width           =   975
   End
   Begin VB.CommandButton cmdNav 
      Caption         =   "测试连接"
      Height          =   312
      Index           =   0
      Left            =   0
      MaskColor       =   &H00000000&
      TabIndex        =   4
      Tag             =   "100"
      Top             =   3840
      Width           =   1092
   End
   Begin VB.CommandButton cmdNav 
      Cancel          =   -1  'True
      Caption         =   "取消"
      Height          =   312
      Index           =   1
      Left            =   1320
      MaskColor       =   &H00000000&
      TabIndex        =   3
      Tag             =   "101"
      Top             =   3840
      Width           =   855
   End
   Begin VB.CommandButton cmdNav 
      Caption         =   "下一步(&N)"
      Height          =   312
      Index           =   3
      Left            =   3360
      MaskColor       =   &H00000000&
      TabIndex        =   2
      Tag             =   "103"
      Top             =   3840
      Width           =   1092
   End
   Begin VB.CommandButton cmdNav 
      Caption         =   "完成(&F)"
      Height          =   312
      Index           =   4
      Left            =   4560
      MaskColor       =   &H00000000&
      TabIndex        =   1
      Tag             =   "104"
      Top             =   3840
      Width           =   855
   End
   Begin VB.Frame Frame2 
      Caption         =   "设置ORACLE基本参数"
      Height          =   2775
      Left            =   120
      TabIndex        =   0
      Top             =   840
      Width           =   5175
      Begin VB.TextBox Txt_oracle_servername 
         Height          =   375
         Left            =   2640
         TabIndex        =   10
         Text            =   "Txt_oracle_servername"
         Top             =   1680
         Width           =   2055
      End
      Begin VB.TextBox Txt_oracle_password 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   2640
         PasswordChar    =   "*"
         TabIndex        =   9
         Text            =   "Txt_oracle_password"
         Top             =   1200
         Width           =   2055
      End
      Begin VB.TextBox Txt_oracle_userid 
         Height          =   390
         Left            =   2640
         TabIndex        =   5
         Text            =   "Txt_oracle_userid"
         Top             =   720
         Width           =   2055
      End
      Begin VB.Label Label3 
         Caption         =   "ORACLE   密码:"
         Height          =   375
         Left            =   600
         TabIndex        =   8
         Top             =   1320
         Width           =   1455
      End
      Begin VB.Label Label2 
         Caption         =   "ORACLE 用户名:"
         Height          =   375
         Left            =   600
         TabIndex        =   7
         Top             =   840
         Width           =   1815
      End
      Begin VB.Label Label1 
         Caption         =   "ORACLE 数据库服务名:"
         Height          =   375
         Left            =   600
         TabIndex        =   6
         Top             =   1800
         Width           =   1935
      End
   End
   Begin VB.Label Label4 
      Caption         =   "设置ORACLE数据库备份的参数:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   255
      Left            =   120
      TabIndex        =   11
      Top             =   360
      Width           =   3015
   End
End
Attribute VB_Name = "Frm_oracle_set"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub cmdNav_Click(Index As Integer)

Select Case Index

  Case 0
  
  
  If Trim(Txt_oracle_userid.Text) = "" Then
    
        
        MsgBox "请输入ORACLE 用户名!", vbCritical, Me.Caption
        
        Exit Sub
        
  End If

  
  Call ConnectDB
  
  Case 1
  
  Unload Me
  
  Case 2
  
  Call Save_regedit
  
  Frmchoice.Show
  
  Unload Me
  
  Case 3
  
  Call Save_regedit
  
  Frm_time_set.Show
  
  Unload Me
 
  Case 4
  
  Call Save_regedit
  
  Tempstr = "完成ORACLE备份参数设置。"
  
  Call writerizhi(Tempstr, Len(Tempstr))
  
  Unload Me

  End Select
End Sub

Private Sub Form_Load()
 
    
    CenterForm Me
    
    On Error GoTo errhandler
    
     Txt_oracle_userid.Text = GetSetting("databackup", "sysinformation", "Txt_oracle_userid")
     
     If Trim(GetSetting("databackup", "sysinformation", "Txt_oracle_password")) = "" Then
     
     Txt_oracle_password.Text = ""
     
     Else
     
     Txt_oracle_password.Text = EncryptText(GetSetting("databackup", "sysinformation", "Txt_oracle_password"), "ljp")
     
     End If
     
     Txt_oracle_servername.Text = GetSetting("databackup", "sysinformation", "Txt_oracle_servername")
     
     Exit Sub

errhandler:
     
     Txt_oracle_userid.Text = ""
     
     Txt_oracle_password.Text = ""
     
     Txt_oracle_servername.Text = ""
      
      
End Sub
Private Sub ConnectDB()

    
    On Error Resume Next
    
    OracleConnectstring = "Provider=MSDAORA.1;Password=" + Txt_oracle_password.Text + ";User ID=" + Txt_oracle_userid.Text + ";Data Source=" + Txt_oracle_servername + ";Persist Security Info=True"
    
    OracleCn.ConnectionString = OracleConnectstring
    
    OracleCn.Open
    
    If Err.Number <> 0 Then
    
        Screen.MousePointer = 0
        
        MsgBox "数据库连接失败!", vbCritical, Me.Caption
        
        Exit Sub
        
    End If
    
    MsgBox "数据库测试成功!", vbInformation + vbOKOnly, Me.Caption
    
    OracleCn.Close
    
End Sub

Private Sub Save_regedit()

      SaveSetting "databackup", "sysinformation", "Txt_oracle_servername", Trim(Txt_oracle_servername.Text)
      
      SaveSetting "databackup", "sysinformation", "Txt_oracle_userid", Trim(Txt_oracle_userid.Text)
       
      SaveSetting "databackup", "sysinformation", "Txt_oracle_password", EncryptText(Trim(Txt_oracle_password.Text), "ljp")
     
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -