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

📄 history.frm

📁 一个数据库程序
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form history 
   BackColor       =   &H80000000&
   Caption         =   "历史数据"
   ClientHeight    =   6105
   ClientLeft      =   4920
   ClientTop       =   1800
   ClientWidth     =   7830
   Icon            =   "history.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   6105
   ScaleWidth      =   7830
   Begin VB.Timer Timer1 
      Interval        =   5000
      Left            =   6000
      Top             =   5040
   End
   Begin VB.CommandButton Command1 
      Caption         =   "返回"
      Height          =   375
      Left            =   6840
      TabIndex        =   4
      Top             =   5040
      Width           =   735
   End
   Begin VB.OptionButton Option3 
      BackColor       =   &H80000000&
      Height          =   195
      Left            =   4920
      TabIndex        =   3
      Top             =   5160
      Width           =   375
   End
   Begin VB.OptionButton Option2 
      BackColor       =   &H80000000&
      Height          =   195
      Left            =   3240
      TabIndex        =   2
      Top             =   5160
      Width           =   375
   End
   Begin VB.OptionButton Option1 
      BackColor       =   &H80000000&
      Height          =   195
      Left            =   1320
      TabIndex        =   1
      Top             =   5160
      Width           =   375
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "history.frx":324A
      Height          =   4815
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   7815
      _ExtentX        =   13785
      _ExtentY        =   8493
      _Version        =   393216
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   1440
      Top             =   5520
      Visible         =   0   'False
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=图书管理数据库;Data Source=(local)"
      OLEDBString     =   "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=图书管理数据库;Data Source=(local)"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select   *  from 图书借阅历史表  "
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Label Label3 
      BackColor       =   &H80000000&
      Caption         =   "催还通知单"
      Height          =   375
      Left            =   3960
      TabIndex        =   7
      Top             =   5160
      Width           =   975
   End
   Begin VB.Label Label2 
      BackColor       =   &H80000000&
      Caption         =   "图书借阅量"
      Height          =   375
      Left            =   2280
      TabIndex        =   6
      Top             =   5160
      Width           =   975
   End
   Begin VB.Label Label1 
      BackColor       =   &H80000000&
      Caption         =   "读者借阅量"
      Height          =   375
      Left            =   360
      TabIndex        =   5
      Top             =   5160
      Width           =   975
   End
End
Attribute VB_Name = "history"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim str As String
Dim n As Integer


Private Sub Command1_Click()
Unload Me

End Sub



Private Sub DataGrid1_HeadClick(ByVal ColIndex As Integer)
If n = 0 Then
    With Adodc1.Recordset
    .Sort = .Fields(ColIndex).Name & " DESC"
    End With
    DataGrid1.Refresh
    n = 1
Else
    With Adodc1.Recordset
    .Sort = .Fields(ColIndex).Name & " ASC"
    End With
    DataGrid1.Refresh
    n = 0
End If

End Sub

Private Sub Form_Load()
    n = 0
End Sub

Private Sub Form_Resize()
    DataGrid1.Width = history.Width
    DataGrid1.Height = history.Height - 1800
    Option1.Top = history.Height - 1000
    Label1.Top = history.Height - 1000
    Label2.Top = history.Height - 1000
    Option2.Top = history.Height - 1000
    Label3.Top = history.Height - 1000
    Option3.Top = history.Height - 1000
    Command1.Top = history.Height - 1500
End Sub

Private Sub Option1_GotFocus()
Adodc1.RecordSource = "select 读者编号,count(图书编号) as 借书数量  from 图书借阅历史表 group by 读者编号"
Adodc1.Refresh
'DataGrid1.DataSource = Adodc1.RecordSource



End Sub

Private Sub Option2_GotFocus()
Adodc1.RecordSource = "select 图书编号,书名,count(读者编号) as 借书人数 from 图书借阅历史表 group by 图书编号,书名 "
Adodc1.Refresh
'DataGrid1.DataSource = Adodc1.RecordSource


End Sub
Private Sub Option3_GotFocus()
Adodc1.RecordSource = "select * from 催还通知单 "
Adodc1.Refresh


End Sub

Private Sub Timer1_Timer()
 '
If Trim(Time) < "08:31:00" And Trim(Time) > "08:29:00" Then
    str = "delete 催还通知单 "
    exesql (str)
    str = "insert 催还通知单 select * from 图书借阅表 where getdate()-借书日期>29"
    exesql (str)
    Adodc1.Refresh


End If
       
End Sub



⌨️ 快捷键说明

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