[求助]关于ADODB
我根据书上写了以下代码,但提示说“找不到可安装的ISAM”请问是怎么会事?Dim cn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rs As New ADODB.Recordset
On Error GoTo runsql_error
Set cn = New ADODB.Connection
cn.ConnectionString = "provider=microsoft.jet.oledb.4.0;datasourcr=chengfen.mdb"
cn.Open
cmd.ActiveConnection = cn
cmd.CommandType = adCmdText
cmd.CommandText = Text1.Text
rs.CursorLocation = adUseClient
rs.CursorType = adOpenStatic
rs.LockType = adLockReadOnly
rs.Open cmd
Set DataGrid1.DataSource = rs
MsgBox "查看查询结果!"
Exit Sub
runsql_error:
MsgBox "错误:" & Err.Description