急,求助!关于datareport(打印报表)在其他机子(没vb环境)上运行出错
我把程序打包后,在其他机子上安装(win98,2000都试过,都没VB环境),点击“打印报表”,结果出错,
假如我在按扭代码加了错误处理 on error resumne next,出错信息为:从当前数据资源中取得行值失败;如果没加错误处理就是:运行时错误"3706",provider not be found.....(2000机上是 作用对象失败~)
下面是我的打印报表的按扭程序(在自己机子上运行正常),其中deskcdata为动态分配的数据库。我调试时3个MSGBOX都出现了。
我怀疑是否有些DLL、OCX文件没装 (当然MSBIND。DLL,MSDBRPTR.dll还有其他几个也装了),请高手为我解忧。
时间急,谢了!
On Error Resume Next
With DBconect.Connection1
If .State <> adStateClosed Then .Close
.Open "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=" + desKCData + ";Jet OLEDB:Database Password=dsylrdh"
msgbox "ok1"
End With
With DBconect
.Commands("Command1").ActiveConnection = .Connection1
.Commands("Command1").CommandType = adCmdTable
.Commands("Command1").CommandText = "信息表"
.Commands("Command1").Execute
msgbox "ok2"
End With
With DataReport2
.Sections("Section1").Controls("Label1").Caption = desXMEnd With
msgbox "ok3"
end with
DataReport2.Show vbModal '问题可能出在此
DBconect.Connection1.Close