智能排课系统vb代码(10)
时间:2025-04-05
时间:2025-04-05
和智能智能排课系统1、2、3是一套
Dim sc As ADODB.Recordset
Set sc = New ADODB.Recordset
SQL = "deletel 排课表 "
End Sub
Private Sub Command3_Click()
Form9.Hide
Form3.Show
End Sub
Private Sub Form_Load()
constr = "Driver={SQL Server};Server=PC2012110412ewr.;Database=GXPK;" _
& "uid =sa;pwd=t123" 'SQL Server普通安全模式建立到Pubs数据库的连接的连接字符串 '定义数据库连接
With Conn
.ConnectionString = constr '给ConnectionString属性赋值
.ConnectionTimeout = 10
.Open '给连接的ConnectionString属性赋值,然后使用求带参数的Open方法打开连接 End With
MsgBox ("连接成功")
ProgressBar1.Visible = True
ProgressBar1.Max = 200
ProgressBar1.Value = ProgressBar1.Min
End Sub
Private Sub Command1_Click() '开始
Dim SQL, sqll, sqlll As String
Dim rt As New ADODB.Recordset
Dim rm As New ADODB.Recordset
Dim rn As New ADODB.Recordset
Dim rp As New ADODB.Recordset
Dim rq As New ADODB.Recordset
Dim i As Integer
Set Rs = New ADODB.Recordset
SQL = "select * from 任课表 "
Set Rs = Conn.Execute(SQL)
ProgressBar1.Max = 100
Do While ProgressBar1.Value < ProgressBar1.Max
Do Until Rs.EOF = True
i = Rs("每周节数")
Do Until i = 0
sqll = "select * from 时间表"
Set rt = Conn.Execute(sqll)
Do Until rt.EOF = True
Set rp = New ADODB.Recordset
coom = "select * from 排课表 where [班级编号]='" + Rs("班级编号") + "'and [上课时间]='" + rt("上课时间") + "'"
上一篇:现代高血压药物治疗策略与趋势