VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3705
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4725
   LinkTopic       =   "Form1"
   ScaleHeight     =   3705
   ScaleWidth      =   4725
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame1 
      Caption         =   "查询"
      Height          =   1095
      Left            =   360
      TabIndex        =   15
      Top             =   2040
      Width           =   2415
      Begin VB.CommandButton cmdFind 
         Caption         =   "查找"
         Height          =   255
         Left            =   600
         TabIndex        =   18
         Top             =   720
         Width           =   975
      End
      Begin VB.TextBox txtQueryName 
         Height          =   270
         Left            =   720
         TabIndex        =   17
         Top             =   240
         Width           =   1575
      End
      Begin VB.Label Label6 
         Caption         =   "片名："
         Height          =   255
         Left            =   240
         TabIndex        =   16
         Top             =   240
         Width           =   615
      End
   End
   Begin VB.TextBox txtIntro 
      DataField       =   "影片介绍"
      DataSource      =   "Adodc1"
      Height          =   285
      Left            =   1245
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   9
      Top             =   1635
      Width           =   3375
   End
   Begin VB.TextBox txtLastTime 
      DataField       =   "上次观看时间"
      DataSource      =   "Adodc1"
      Height          =   285
      Left            =   1245
      TabIndex        =   8
      Top             =   1260
      Width           =   1320
   End
   Begin VB.TextBox txtPath 
      DataField       =   "存储路径"
      DataSource      =   "Adodc1"
      Height          =   285
      Left            =   1245
      TabIndex        =   7
      Top             =   885
      Width           =   3375
   End
   Begin VB.TextBox txtFilm 
      DataField       =   "片名"
      DataSource      =   "Adodc1"
      Height          =   285
      Left            =   1245
      TabIndex        =   6
      Top             =   495
      Width           =   3300
   End
   Begin VB.TextBox txtNum 
      DataField       =   "编号"
      DataSource      =   "Adodc1"
      Height          =   285
      Left            =   1245
      TabIndex        =   5
      Top             =   120
      Width           =   330
   End
   Begin VB.CommandButton cmdUpdata 
      Caption         =   "更新"
      Height          =   255
      Left            =   3840
      TabIndex        =   4
      Top             =   2160
      Width           =   735
   End
   Begin VB.CommandButton cmdExit 
      Caption         =   "关闭"
      Height          =   255
      Left            =   3840
      TabIndex        =   3
      Top             =   2880
      Width           =   735
   End
   Begin VB.CommandButton cmdAdd 
      Caption         =   "添加"
      Height          =   255
      Left            =   3000
      TabIndex        =   2
      Top             =   2520
      Width           =   735
   End
   Begin VB.CommandButton cmdDel 
      Caption         =   "删除"
      Height          =   255
      Left            =   3000
      TabIndex        =   1
      Top             =   2880
      Width           =   735
   End
   Begin VB.CommandButton cmdEdit 
      Caption         =   "修改"
      Height          =   255
      Left            =   3000
      TabIndex        =   0
      Top             =   2160
      Width           =   735
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Align           =   2  'Align Bottom
      Height          =   330
      Left            =   0
      Top             =   3375
      Width           =   4725
      _ExtentX        =   8334
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=G:\VB书稿（改）\project\ADO控件\影片信息数据库.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=G:\VB书稿（改）\project\ADO控件\影片信息数据库.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "影片信息"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Label label5 
      Alignment       =   1  'Right Justify
      AutoSize        =   -1  'True
      Caption         =   "影片介绍:"
      Height          =   255
      Index           =   4
      Left            =   -600
      TabIndex        =   14
      Top             =   1680
      Width           =   1815
   End
   Begin VB.Label label4 
      Alignment       =   1  'Right Justify
      AutoSize        =   -1  'True
      Caption         =   "上次观看时间:"
      Height          =   255
      Index           =   3
      Left            =   -600
      TabIndex        =   13
      Top             =   1305
      Width           =   1815
   End
   Begin VB.Label label3 
      Alignment       =   1  'Right Justify
      AutoSize        =   -1  'True
      Caption         =   "存储路径:"
      Height          =   255
      Index           =   2
      Left            =   -600
      TabIndex        =   12
      Top             =   930
      Width           =   1815
   End
   Begin VB.Label label2 
      Alignment       =   1  'Right Justify
      AutoSize        =   -1  'True
      Caption         =   "片名:"
      Height          =   255
      Index           =   1
      Left            =   -600
      TabIndex        =   11
      Top             =   540
      Width           =   1815
   End
   Begin VB.Label label1 
      Alignment       =   1  'Right Justify
      AutoSize        =   -1  'True
      Caption         =   "编号:"
      Height          =   255
      Index           =   0
      Left            =   -600
      TabIndex        =   10
      Top             =   165
      Width           =   1815
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdAdd_Click()
    Adodc1.Recordset.AddNew  '添加新记录
    cmdUpdata.Enabled = True    '激活更新按钮
End Sub

Private Sub cmdDel_Click()
    Adodc1.Recordset.Delete  '删除当前记录
End Sub

Private Sub cmdEdit_Click()
 '开始修改记录
    cmdUpdata.Enabled = True    '激活更新按钮
End Sub

Private Sub cmdExit_Click()
    End                     '退出程序
End Sub

Private Sub cmdFind_Click()
    Adodc1.Recordset.Filter = "片名='" + txtQueryName + "'" '筛选出符合条件的记录
    If Adodc1.Recordset.EOF = True Then
    '如果当前记录已到文件尾，表示找不到记录
        MsgBox "找不到该影片记录！"
        Adodc1.Recordset.Filter = adFilterNone  '取消筛选
    End If
End Sub

Private Sub cmdUpdata_Click()
    Adodc1.Recordset.Update      '更新记录
    cmdUpdata.Enabled = False   '使更新按钮不可用
End Sub


Private Sub Form_Load()
    cmdUpdata.Enabled = False   '使更新按钮不可用
End Sub

