VERSION 5.00
Begin {C0E45035-5775-11D0-B388-00A0C9055D8E} DataEnvironment1 
   ClientHeight    =   4800
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   6180
   _ExtentX        =   10901
   _ExtentY        =   8467
   FolderFlags     =   1
   TypeLibGuid     =   "{D8C96C37-9B64-11D4-88AD-444553540000}"
   TypeInfoGuid    =   "{D8C96C38-9B64-11D4-88AD-444553540000}"
   TypeInfoCookie  =   0
   Version         =   4
   NumConnections  =   1
   BeginProperty Connection1 
      ConnectionName  =   "Connection1"
      ConnDispId      =   1001
      SourceOfData    =   3
      ConnectionSource=   "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=C:\Student.mdb"
      Expanded        =   -1  'True
      QuoteChar       =   96
      SeparatorChar   =   46
   EndProperty
   NumRecordsets   =   1
   BeginProperty Recordset1 
      CommandName     =   "Command1"
      CommDispId      =   1002
      RsDispId        =   1005
      CommandText     =   "基本情况"
      ActiveConnectionName=   "Connection1"
      CommandType     =   2
      dbObjectType    =   1
      Expanded        =   -1  'True
      IsRSReturning   =   -1  'True
      NumFields       =   6
      BeginProperty Field1 
         Precision       =   0
         Size            =   6
         Scale           =   0
         Type            =   200
         Name            =   "学号"
         Caption         =   "学号"
      EndProperty
      BeginProperty Field2 
         Precision       =   0
         Size            =   10
         Scale           =   0
         Type            =   200
         Name            =   "姓名"
         Caption         =   "姓名"
      EndProperty
      BeginProperty Field3 
         Precision       =   0
         Size            =   10
         Scale           =   0
         Type            =   129
         Name            =   "专业"
         Caption         =   "专业"
      EndProperty
      BeginProperty Field4 
         Precision       =   0
         Size            =   8
         Scale           =   0
         Type            =   7
         Name            =   "出生年月"
         Caption         =   "出生年月"
      EndProperty
      BeginProperty Field5 
         Precision       =   0
         Size            =   2
         Scale           =   0
         Type            =   200
         Name            =   "性别"
         Caption         =   "性别"
      EndProperty
      BeginProperty Field6 
         Precision       =   0
         Size            =   1073741824
         Scale           =   0
         Type            =   205
         Name            =   "照片"
         Caption         =   "照片"
      EndProperty
      NumGroups       =   0
      ParamCount      =   0
      RelationCount   =   0
      AggregateCount  =   0
   EndProperty
End
Attribute VB_Name = "DataEnvironment1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub DataEnvironment_Initialize()
    Dim sql As String, mpath As String
    mpath = App.Path
    If Right(mpath, 1) <> "\" Then mpath = mpath + "\"
    sql = "Select 基本情况.姓名,Avg(成绩) As 平均成绩,min(成绩) As 最低成绩"
    sql = sql + " From 基本情况,学生成绩表 Where 基本情况.学号=学生成绩表.学号"
    sql = sql + " group by 学生成绩表.学号,基本情况.姓名  order by Avg(成绩) desc;"
    mlink = "Provider=Microsoft.Jet.OLEDB.3.51;"
    mlink = mlink + "Data Source=" + mpath + "student.mdb"
    DataEnvironment1.Connection1.ConnectionString = mlink
End Sub
