MichaelaLee
Programmer
Hi All,
I have a major problem with Crystal Reports I'm hoping someone can help. I'm using VB6, ADO 2.7 and CR9.0. I have a simple report that everytime on the second run of the report (without restarting app) I get the following error message:
Error Number: 2147417848
Automation Error, The object invoked has disconnected from its client.
Here is the code it happens on:
Dim rs As New ADODB.RecordSet
Dim crxDBTables As CRAXDRT.DatabaseTable
Dim crxReport As CRAXDRT.Report
Set rs = SetReportData(ProgramId, OrderId)
Set crxReport = crInvoice
Set crxDBTables = crxReport.Database.Tables(1)
For Each crxDBTables In crxReport.Database.Tables
If crxDBTables.ConnectionProperties("Data Source") <> gDbPath Then
crxDBTables.ConnectionProperties("Data Source") = gDbPath
crxDBTables.ConnectionProperties("User Id") = "Admin"
crxDBTables.ConnectionProperties("Provider") = "Microsoft.Jet.OLEDB.4.0"
End If
Next
crxReport.Database.SetDataSource rs
CRViewer91.ReportSource = crxReport
It seems to happen the second time through as I said before, and it seems that the line crxDBTables.ConnectionProperties("Data Source") is causing the error. If I break at that point and hold my mouse over the code VB crashes with the following error:
Microsoft Visual C++ Runtime Library
Program VB6.exe
This app has requested the runtime to terminate it in an unusual way.
Please help. Has anyone had this problem. Thanks for any help.
Michael Lee
I have a major problem with Crystal Reports I'm hoping someone can help. I'm using VB6, ADO 2.7 and CR9.0. I have a simple report that everytime on the second run of the report (without restarting app) I get the following error message:
Error Number: 2147417848
Automation Error, The object invoked has disconnected from its client.
Here is the code it happens on:
Dim rs As New ADODB.RecordSet
Dim crxDBTables As CRAXDRT.DatabaseTable
Dim crxReport As CRAXDRT.Report
Set rs = SetReportData(ProgramId, OrderId)
Set crxReport = crInvoice
Set crxDBTables = crxReport.Database.Tables(1)
For Each crxDBTables In crxReport.Database.Tables
If crxDBTables.ConnectionProperties("Data Source") <> gDbPath Then
crxDBTables.ConnectionProperties("Data Source") = gDbPath
crxDBTables.ConnectionProperties("User Id") = "Admin"
crxDBTables.ConnectionProperties("Provider") = "Microsoft.Jet.OLEDB.4.0"
End If
Next
crxReport.Database.SetDataSource rs
CRViewer91.ReportSource = crxReport
It seems to happen the second time through as I said before, and it seems that the line crxDBTables.ConnectionProperties("Data Source") is causing the error. If I break at that point and hold my mouse over the code VB crashes with the following error:
Microsoft Visual C++ Runtime Library
Program VB6.exe
This app has requested the runtime to terminate it in an unusual way.
Please help. Has anyone had this problem. Thanks for any help.
Michael Lee