vb6调用access数据库,adodc2出现错误
vb调用access数据库,adodc2出现错误当移动adodc1的时候,adodc2应当在表格中出现所选的记录。
可移动后,出现错误,“未找到提供程序,改程序可能未正确安装”
确定后,“实时错误‘3706’”
应用程序定义或对象定义错误
调试,错误语句
Adodc2.Refresh
Private Sub Text1_Validate(Cancel As Boolean)
Dim sql As String
Dim str_no As String
str_no = Adodc1.Recordset("stu_id")
sql = "select score.maths,score.english,score.econmic from score where score.stu_id='" + str_no + "'"
Adodc2.ConnectionString = "provider=microsoft.jet.oledb.3.51:data source =E:\myvbtest\student.mdb:" & "persist security info=false"
= 8
Print sql
Adodc2.RecordSource = sql
Adodc2.Refresh
Set DataGrid1.DataSource = Adodc2
End Sub
实在是找不出原因了,烦各位老师帮助解决!
myvbtest.rar
(6.34 KB)
[ 本帖最后由 wzxc 于 2010-1-21 21:02 编辑 ]