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

📄 form3.frm

📁 会员后台sql管理工具。 方便续费
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form3 
   Caption         =   "续费"
   ClientHeight    =   2355
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   2670
   Icon            =   "Form3.frx":0000
   LinkTopic       =   "Form3"
   ScaleHeight     =   2355
   ScaleWidth      =   2670
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   1200
      TabIndex        =   4
      Top             =   960
      Width           =   1215
   End
   Begin VB.CommandButton Command2 
      Caption         =   "退出"
      Height          =   375
      Left            =   1320
      TabIndex        =   3
      Top             =   1920
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   120
      TabIndex        =   1
      Top             =   1920
      Width           =   975
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1200
      TabIndex        =   0
      Top             =   240
      Width           =   1215
   End
   Begin VB.Label Label3 
      Caption         =   "日期格式:20081201"
      Height          =   255
      Left            =   480
      TabIndex        =   6
      Top             =   1440
      Width           =   1695
   End
   Begin VB.Label Label2 
      Caption         =   "续费日期"
      Height          =   255
      Left            =   240
      TabIndex        =   5
      Top             =   1080
      Width           =   735
   End
   Begin VB.Label Label1 
      Caption         =   "用 户 名:"
      Height          =   255
      Left            =   240
      TabIndex        =   2
      Top             =   360
      Width           =   735
   End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    Dim gAdoConn As New ADODB.Connection
    Dim gStrConn As String
    '创建对象
    Set gAdoConn = New ADODB.Connection
    '定义Connection对象连接参数
    'provider参数指定连接数据库驱动,data bank_zhhao参数指定数据库名称
    gStrConn = "driver={SQL Server};" & _
"server=61.174.60.164;uid=jincaia;pwd=meilishijie;database=jincai"
    
    '使用连接参数,建立数据库连接
    gAdoConn.Open gStrConn

    Dim adoSetMima As ADODB.Recordset
    Dim strSQL As String
    Dim blnChangeAble As Boolean
    
    If Text1.Text <> "" Then
        blnChangeAble = True
    Else
        MsgBox "请输入帐号", vbOKOnly, "请输入帐号"
        Text1.Text = ""
        Text1.SetFocus
    End If
    
    If blnChangeAble Then
      
        strSQL = "select name,vipdq from users where name = '" & Text1.Text & "'"
        Set adoSetMima = New ADODB.Recordset
             
        adoSetMima.Open strSQL, gAdoConn, adOpenKeyset, adLockBatchOptimistic   '打开记录集,以备修改密码
            If adoSetMima.BOF = False Then
           
            adoSetMima!vipdq = Text2.Text
            adoSetMima.UpdateBatch
            MsgBox "修改成功!", vbOKOnly, "修改"
            Else
             MsgBox "没有找到该用户!请确定输入是否正确", vbOKOnly, "添加错误"
             End If
        adoSetMima.Close ' 关闭记录集
    End If
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

⌨️ 快捷键说明

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