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

📄 form7.frm

📁 我自己编的 截面垃圾了点
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form7 
   BackColor       =   &H00FFFF00&
   ClientHeight    =   3150
   ClientLeft      =   60
   ClientTop       =   390
   ClientWidth     =   4680
   LinkTopic       =   "Form7"
   ScaleHeight     =   3150
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text7 
      Height          =   375
      Left            =   1320
      TabIndex        =   14
      Top             =   2640
      Width           =   1095
   End
   Begin VB.TextBox Text6 
      Height          =   390
      Left            =   2880
      TabIndex        =   12
      Top             =   1680
      Width           =   1215
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   2520
      Top             =   2760
      Width           =   1815
      _ExtentX        =   3201
      _ExtentY        =   582
      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=a;Data Source=a10"
      OLEDBString     =   "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=a;Data Source=a10"
      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.TextBox Text1 
      Height          =   375
      Left            =   1320
      TabIndex        =   5
      Top             =   120
      Width           =   1095
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   1320
      TabIndex        =   4
      Top             =   720
      Width           =   1095
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   1320
      TabIndex        =   3
      Top             =   1440
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "退出"
      Height          =   495
      Left            =   2880
      TabIndex        =   2
      Top             =   2160
      Width           =   1215
   End
   Begin VB.TextBox Text4 
      Height          =   375
      Left            =   1320
      TabIndex        =   1
      Top             =   2040
      Width           =   1095
   End
   Begin VB.CommandButton Command4 
      Caption         =   "查询"
      Height          =   495
      Left            =   2880
      TabIndex        =   0
      Top             =   720
      Width           =   1215
   End
   Begin VB.Label Label8 
      BackColor       =   &H00FFFF00&
      Caption         =   "学生名"
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   360
      TabIndex        =   13
      Top             =   2640
      Width           =   855
   End
   Begin VB.Label Label7 
      BackColor       =   &H00FFFF00&
      Caption         =   "输入你要查询的学生号"
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   2640
      TabIndex        =   11
      Top             =   1320
      Width           =   1935
   End
   Begin VB.Label Label6 
      BackColor       =   &H00FFFF00&
      Caption         =   "选课查询"
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   3120
      TabIndex        =   10
      Top             =   360
      Width           =   855
   End
   Begin VB.Label Label1 
      BackColor       =   &H00FFFF00&
      Caption         =   "课程号"
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   360
      TabIndex        =   9
      Top             =   840
      Width           =   735
   End
   Begin VB.Label Label2 
      BackColor       =   &H00FFFF00&
      Caption         =   "成绩"
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   360
      TabIndex        =   8
      Top             =   1560
      Width           =   615
   End
   Begin VB.Label Label3 
      BackColor       =   &H00FFFF00&
      Caption         =   "学分"
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   360
      TabIndex        =   7
      Top             =   2160
      Width           =   615
   End
   Begin VB.Label Label4 
      BackColor       =   &H00FFFF00&
      Caption         =   "学生号"
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   360
      TabIndex        =   6
      Top             =   240
      Width           =   735
   End
End
Attribute VB_Name = "Form7"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim conn As New ADODB.Connection
Dim add As New ADODB.Command
Dim rst As New ADODB.Recordset
Private Sub Form_Load()
Set conn = New ADODB.Connection
Set rst = New ADODB.Recordset
Set add = New ADODB.Command
rst.LockType = adLockOptimistic
rst.CursorType = adOpenKeyset
conn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=a"
conn.Open
End Sub
Private Sub Command1_Click()
Form7.Hide
Form1.Show
End Sub
Private Sub Command4_Click()
Dim one As String
Set rst.ActiveConnection = conn
If (Text6.Text = "") Then
one = "select*from xuekecheng"
Else
one = "select*from xuekecheng  where 学生号=" & CInt(Text6.Text)
End If
rst.Open one
If rst.EOF Then
MsgBox "nothing"
GoTo end1
End If
Text1.Text = rst.Fields("学生号")
Text2.Text = rst.Fields("课程号")
Text3.Text = rst.Fields("成绩")
Text4.Text = rst.Fields("学分")
Text7.Text = rst.Fields("学生名")
end1:
rst.Close
End Sub

⌨️ 快捷键说明

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