[求助]至少一个参数没有被指定值
实时错误‘-2147217904(80040e10)’:
至少一个参数没有被指定值
代码如下:
Private Sub cbodep_Click()
Dim rsclass As New ADODB.Recordset
Dim strSQL
'根据所选的系的不同,采用不同的SQL 语句
If cbodep.ItemData(cbodep.ListIndex) = 0 Then
strSQL = "select*from class"
Else
strSQL = "select*from class where dep_id=" & cbodep.ItemData(cbodep.ListIndex)
End If
rsclass.Open strSQL, DataEnv.Connection1
'将所查到的rsClass中的内容来填充cboclass
cboClass.Clear
cboClass.AddItem "全部"
While Not rsclass.EOF
cboClass.AddItem rsclass("name")
rsclass.MoveNext
Wend
cboClass.ListIndex = 0
rsclass.Clone
Set rsclass = Nothing
End Sub
报错出现在 这一句: rsclass.Open strSQL, DataEnv.Connection1
[此贴子已经被作者于2006-8-1 13:46:15编辑过]