vb 连接ACCESS 是出现找不到可安装的ISAM错误 问题何在?
DimcnAsADODB.ConnectionDimrsAsADODB.RecordsetSetcn=NewADODB.Connectioncn.Open"provide...
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cn = New ADODB.Connection
cn.Open "provider= """"Microsoft.Jet.OLEDB.4.0; datasource=C:\Documents and Settings\Administrator\桌面\实验\实验表.mdb """ '(引号里的字符串要写对)
Set rs = New ADODB.Recordset
rs.Open "select * from 实验表 ", cn
Set DataGrid1.DataSource = rs 展开
Dim rs As ADODB.Recordset
Set cn = New ADODB.Connection
cn.Open "provider= """"Microsoft.Jet.OLEDB.4.0; datasource=C:\Documents and Settings\Administrator\桌面\实验\实验表.mdb """ '(引号里的字符串要写对)
Set rs = New ADODB.Recordset
rs.Open "select * from 实验表 ", cn
Set DataGrid1.DataSource = rs 展开
1个回答
2011-08-31
展开全部
cn.ConnectionString = "DRIVER=Microsoft Access Driver (*.mdb);dbQ=C:\Documents and Settings\Administrator\桌面\实验\实验表.mdb"
cn.Open
OR
cn.ConnectionString = "DRIVER=Microsoft Access Driver (*.mdb);dbQ=" & App.Path & "\实验表.mdb"
cn.Open
Set rs = New ADODB.Recordset '不写,否则出现重复定义错误
cn.Open
OR
cn.ConnectionString = "DRIVER=Microsoft Access Driver (*.mdb);dbQ=" & App.Path & "\实验表.mdb"
cn.Open
Set rs = New ADODB.Recordset '不写,否则出现重复定义错误
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询