Protected Sub Command2_Click() Handles Label3.Load '读取数据库中系统时间表的学年字段
Dim con As OleDbConnection
Dim cmd As OleDbCommand
con = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=|DataDirectory|\jsdb2.mdb")
con.Open()
cmd = New OleDbCommand("select [nian] from [time]", con)
Label3.Text = cmd.ExecuteScalar().ToString
con.Close()
End Sub
Dim con As OleDbConnection
Dim cmd As OleDbCommand
con = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=|DataDirectory|\jsdb2.mdb")
con.Open()
cmd = New OleDbCommand("select [nian] from [time]", con)
Label3.Text = cmd.ExecuteScalar().ToString
con.Close()
End Sub