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

📄 stuinforaccount.frm

📁 sql+vb实现招生管理系统
💻 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 FrmStuInforAccount 
   Caption         =   "考生信息统计"
   ClientHeight    =   7260
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   8115
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   ScaleHeight     =   7260
   ScaleWidth      =   8115
   StartUpPosition =   2  '屏幕中心
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   495
      Left            =   1920
      Top             =   6720
      Width           =   3975
      _ExtentX        =   7011
      _ExtentY        =   873
      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         =   ""
      OLEDBString     =   ""
      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 MSDataGridLib.DataGrid DataGrid4 
      Height          =   2055
      Left            =   0
      TabIndex        =   3
      Top             =   4560
      Width           =   8055
      _ExtentX        =   14208
      _ExtentY        =   3625
      _Version        =   393216
      BackColor       =   65535
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   "考生信息按招考院系和籍贯统计"
      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 MSDataGridLib.DataGrid DataGrid3 
      Height          =   2535
      Left            =   3960
      TabIndex        =   2
      Top             =   1920
      Width           =   4095
      _ExtentX        =   7223
      _ExtentY        =   4471
      _Version        =   393216
      BackColor       =   65535
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   "考生信息按招考院系统计"
      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 MSDataGridLib.DataGrid DataGrid2 
      Height          =   2535
      Left            =   120
      TabIndex        =   1
      Top             =   1920
      Width           =   3735
      _ExtentX        =   6588
      _ExtentY        =   4471
      _Version        =   393216
      BackColor       =   65535
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   "考生信息按籍贯统计"
      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 MSDataGridLib.DataGrid DataGrid1 
      Height          =   1815
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   8055
      _ExtentX        =   14208
      _ExtentY        =   3201
      _Version        =   393216
      BackColor       =   65535
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   "考生信息按文理科、招考院系、籍贯、总分排列"
      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
End
Attribute VB_Name = "FrmStuInforAccount"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs_allStu As New ADODB.Recordset
Dim rs_provStu As New ADODB.Recordset  '按省份统计考生
Dim rs_deptStu As New ADODB.Recordset   '按院系统计考生
Dim rs_pdStu As New ADODB.Recordset '先按院系再按省份统计
Public MyConnection As ADODB.Connection
Public ConString As String

 
Private Sub Form_Load()
  Set MyConnection = New ADODB.Connection
  ConString = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=Education_Maneger_System"
  MyConnection.Open ConString
  
   Dim sqlall As String
   Dim sqlProv As String
   Dim sqldept As String
   Dim sqlpd As String
   
   rs_allStu.CursorLocation = adUseClient
   rs_provStu.CursorLocation = adUseClient
   rs_deptStu.CursorLocation = adUseClient
   rs_pdStu.CursorLocation = adUseClient
   
   '下面的sql语句从StuBasicInfor、StudentGrade、StuVolunteers3个表中抽出相关信息,并且
   '按照ComprehensiveClassify,VolunteerOne,TheSeatOfAccount,Score排序显示
   
   
   
   
   
   
   sqlall = "select A.CandidatesID,A.Name,A.TheSeatOfAccount,B.Score,B.ComprehensiveClassify,C.VolunteerOne " _
   & " from StuBasicInfor as A,StudentGrade as B,StuVolunteers  as C where " _
   & " A.CandidatesID = B.CandidatesID and A.CandidatesID = C.CandidatesID order " _
   & " by ComprehensiveClassify,VolunteerOne,TheSeatOfAccount,Score desc"
   
   rs_allStu.Open sqlall, MyConnection, adOpenStatic, adLockOptimistic
   Set DataGrid1.DataSource = rs_allStu
   
   '统计各省的考生人数
   sqlProv = "select TheSeatOfAccount, count(FirstVolunteer) as Quatity from StuBasicInfor as A, " _
   & " StuVolunteers as B where A.CandidatesID=B.CandidatesID group by TheSeatOfAccount"
   rs_provStu.Open sqlProv, MyConnection, adOpenStatic, adLockOptimistic
   Set DataGrid2.DataSource = rs_provStu
   '统计报考各院系的考生人数
   sqldept = "select VolunteerOne, count(CandidatesID) as Quatity from StuVolunteers " _
   & " group by VolunteerOne"
   rs_deptStu.Open sqldept, MyConnection, adOpenStatic, adLockOptimistic
   Set DataGrid3.DataSource = rs_deptStu
   '统计报考各院系的各省的考生人数
   sqlpd = "select VolunteerOne,TheSeatOfAccount,count(TheSeatOfAccount) as Quatity from StuBasicInfor as A," _
   & "StuVolunteers as B where A.CandidatesID=B.CandidatesID group by VolunteerOne,TheSeatOfAccount"
   rs_pdStu.Open sqlpd, MyConnection, adOpenStatic, adLockOptimistic
   Set DataGrid4.DataSource = rs_pdStu
End Sub

Private Sub Form_Unload(Cancel As Integer)
   Set DataGrid1.DataSource = Adodc1 '使网格的数据源转向空的Adodc控件,否则有可能无法关闭
   DataGrid1.Refresh
   Set DataGrid2.DataSource = Adodc1
   DataGrid2.Refresh
   Set DataGrid3.DataSource = Adodc1
   DataGrid3.Refresh
   Set DataGrid4.DataSource = Adodc1
   DataGrid4.Refresh
   rs_allStu.Close
   rs_provStu.Close
   rs_deptStu.Close
   rs_pdStu.Close
End Sub


⌨️ 快捷键说明

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