我用VB6链接ACCESS2003库,但执行到K:行时就出现以下错误提示:不知道哪里出问题,求赐教,谢谢!
Dim adoRS As New ADODB.Recordset
Dim strConn As String
Dim strSQL As String
Dim strDataFile As String
Dim strTableName As String
strDataFile = "D:\test\pad.mdb"
strTableName = "kset"
strConn = "Data Source=" & strDataFile & ";Provider=Microsoft.Jet.OLEDB.4.0"
strSQL = "Select * from " & strTableName
K: adoRS.Open strSQL, strConn
adoRS.Close
Set adoRS = Nothing
Dim adoRS As New ADODB.Recordset
Dim strConn As String
Dim strSQL As String
Dim strDataFile As String
Dim strTableName As String
strDataFile = "D:\test\pad.mdb"
strTableName = "kset"
strConn = "Data Source=" & strDataFile & ";Provider=Microsoft.Jet.OLEDB.4.0"
strSQL = "Select * from " & strTableName
K: adoRS.Open strSQL, strConn
adoRS.Close
Set adoRS = Nothing
解决方案 »
- 怎么在function中终止程序继续运行
- VB十六进制颜色显示
- OpenDatabase 问题
- 怎么鼠标移动的,获取其坐标?
- 如何用flash做的Button实现CommandButton的功能?
- 谁可以做一个VB通用的安装程序?
- 请问在VB中用代码怎么样列出SQLServer2000中的所有数据库?
- 求救:在VB程序中备份SQL数据库!
- VB中使用ADO将数据库中的数据导入到Excel工作表后的下一步问题??
- 质疑微软,这个问题难吗,怎么解决?http://www.csdn.net/expert/topic/674/674920.xml?temp=.593548
- 求教:关于子框架参数传递的问题
- 急求:关于VB6的调试问题
dim pConn as ADODB.Connection
Dim strConn As String
Dim strSQL As String
Dim strDataFile As String
Dim strTableName As String
strDataFile = "D:\test\pad.mdb"
strTableName = "kset"
strConn = "Data Source=" & strDataFile & ";Provider=Microsoft.Jet.OLEDB.4.0"
pconn.open connectionstring:=strconn
strSQL = "Select * from " & strTableName
K: adoRS.Open strSQL, strConn
adoRS.Close
Set adoRS = Nothing
对象变量或With块变量未设置。未加此句前,错误提示为:
实时错误'-2147217911 (80040e09)',不能读取记录;在"kset"上没有读取数据权限
Dim adoRS As New ADODB.Recordset
Dim strConn As String
Dim strSQL As String
Dim strDataFile As String
Dim strTableName As String
strDataFile = "D:\test\pad.mdb"
strTableName = "kset"
strConn = "Data Source=" & strDataFile & ";Provider=Microsoft.Jet.OLEDB.4.0"
adoCN.Open strConn
strSQL = "Select * from " & strTableName
K: adoRS.Open strSQL, adoCN
adoRS.Close
Set adoRS = Nothing
adoCN.Close
Set adoCN = Nothing
http://download.csdn.net/source/1498324