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

📄 f数据库连接.frm

📁 原码和使用说明都有,用VB和SQL2000综合、设计的
💻 FRM
字号:
VERSION 5.00
Begin VB.Form F数据库连接 
   Caption         =   "数据库连接"
   ClientHeight    =   2715
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   3210
   LinkTopic       =   "Form1"
   ScaleHeight     =   2715
   ScaleWidth      =   3210
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton CmdOK 
      Caption         =   "确定"
      Height          =   375
      Left            =   1920
      TabIndex        =   4
      Top             =   2160
      Width           =   975
   End
   Begin VB.TextBox txtUserId 
      Height          =   375
      Left            =   1320
      TabIndex        =   3
      Text            =   "sa"
      Top             =   120
      Width           =   1575
   End
   Begin VB.TextBox txtPwd 
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   1320
      PasswordChar    =   "*"
      TabIndex        =   2
      Text            =   "songxia"
      Top             =   600
      Width           =   1575
   End
   Begin VB.TextBox txtDatabase 
      Height          =   375
      Left            =   1320
      TabIndex        =   1
      Text            =   "图书管理系统"
      Top             =   1080
      Width           =   1575
   End
   Begin VB.TextBox txtServer 
      Height          =   375
      Left            =   1320
      TabIndex        =   0
      Text            =   "BOBCAFER"
      Top             =   1560
      Width           =   1575
   End
   Begin VB.Label Label1 
      Caption         =   "数据库用户ID:"
      Height          =   255
      Left            =   120
      TabIndex        =   8
      Top             =   240
      Width           =   1335
   End
   Begin VB.Label Label2 
      Caption         =   "登陆密码:"
      Height          =   255
      Left            =   120
      TabIndex        =   7
      Top             =   720
      Width           =   1095
   End
   Begin VB.Label Label3 
      Caption         =   "数据库名:"
      Height          =   255
      Left            =   120
      TabIndex        =   6
      Top             =   1200
      Width           =   1095
   End
   Begin VB.Label Label4 
      Caption         =   "服务器名称:"
      Height          =   255
      Left            =   120
      TabIndex        =   5
      Top             =   1680
      Width           =   1095
   End
End
Attribute VB_Name = "F数据库连接"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CmdOK_Click()
'确定操作
    ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=True;"
    ConnectionString = ConnectionString & "User ID=" & Trim(txtUserId.Text) & ";Password=" & Trim(txtPwd.Text) & ";"
    ConnectionString = ConnectionString & "Initial Catalog=" & Trim(txtDatabase.Text) & ";Data Source=" & Trim(txtServer.Text)
    E重新登录.Show
    Unload Me
End Sub

⌨️ 快捷键说明

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