[求助]菜鸟:数据库操作
Dim sqlStr As StringDim sqlcnn As New ADODB.Connection
Dim sqlrst As New ADODB.Recordset
sqlStr = ("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=d:\adou.mdb")
sqlcnn.Open(sqlStr)
If sqlcnn.State Then
MsgBox("成功")
sqlStr = "SELECT sname FROM student WHERE sno=1"
sqlrst = sqlcnn.Execute(sqlStr)
TextBox1.Text = sqlrst.Fields(1)
Else
MsgBox("连接有问题,请检查网络")
End If
数据库显示连接成功,可是sqlrst = sqlcnn.Execute(sqlStr)这句话总是提示错误说“标准表达式中数据类型不匹配”应该怎么改的啊?