没有命令对象.
这个程序提示没有命令对象.Private Sub Command2_Click()
Dim con As New ADODB.Connection
Dim rst As ADODB.Recordset
Set con = New ADODB.Connection
Set rst = New ADODB.Recordset
con.Open "DSN=aa;uid=sa;ped="
'con.Open "Provider=MSDASQL;Data Source=(LOCL);Initial Catalog=StudentMIS;User ID=sa;Password="
rst.Open Trim(SQL), con, adOpenStatic, adLockReadOnly
con.Close
对象打开不能操作.请高手改正.