下面的代码Dim Cnn As ADODB.Connection
Dim rs As ADODB.RecordsetSet Cnn = New ADODB.Connection
Set rs = New ADODB.Recordset
Cnn.CursorLocation = adUseClient
Cnn.Open "Provider=SQLOLEDB.1;Password=111111;Persist Security Info=True;User ID=aa;Initial Catalog=diaodu;Data Source=szx"
rs.Open "zhongduan", Cnn, adOpenStatic, adLockOptimistic在运行时出现“过程‘zhongduan’的请求失败,因为‘zhongduan’是表对象。”
注:“zhongduan”是数据库“diaodu”中的一个表。
在rs.Open "zhongduan", Cnn, adOpenStatic, adLockOptimistic中的‘zhongduan’处不应是表名吗?应该是什么?