你能不能帮我看一下我的代码有哪些问题,程序说“类型不匹配”,谢谢啦!
Private Sub Command4_Click()
Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset
conn.ConnectionString = "pvovider=MSDASQL;" + "DRIVER={MySQL ODBC 3.51 Driver};" + "Sever=202.199.241.175;Port=3306;UID=chxd;PWD=325106;" + "database=chel;Option=16387"
conn.Open
Set rs = conn.Execute("select host,code from user;")
If Not rs.EOF Then
If IIf(IsNull(rs!host), "", rs!host) = Text1.Text And IIf(IsNull(rs!code), "", rs!code) = Text2.Text Then
label.caption="正确"
Else
label.caption="错误"
end if
else
label.caption="错误"
end if
End Sub
dim rs as adodb.recordset
set rs=conn.execute("select host,code from user")
if not rs.eof then
if iif(isnull(rs!host),"",rs!host)=text1.text) and iif(isnull(rs!host),"",rs!host)=text1.text) then
label.caption="正确"
else
label.caption="错误"
end if
else
label.caption="错误"
end if