Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDO-reports generates error

Status
Not open for further replies.

kuling

Programmer
Oct 2, 2001
12
SE
Hi

In our application we use CDO-reports. Every time you close the application and have been viewing the CDO-reports the message "Application.exe have caused an error, the program will be shut down. You must restart the program." appears.

The error message wont show if you dont use the CDO-reports. We have been talking to the support at the company we buy Crystal Reports and they say something about destroying the CDO-object. But how?

/Paul
 
An alternative to using the CDO could be to use an ADO recordset object. You can create an ADO recordset object without any actual database just like the CDO. Like a CDO, an ADO recordset object acts like a data container.

An example of creating an ADO recordset:

Set rs = New Recordset
With rs
With .Fields
.Append "StringField", adVarWChar, 10
.Append "IntegerField", adInteger

End with
.Open
End With

Then just populate the recordset with data using the AddNew and Update methods. Pass the recordset off to Crystal Reports just as you would the CDO.
 
CDO was never meant as a proper datasource - it was developed internally for testing and found so useful it found it's way into finished product. Use ADO - it's much more robust and feature-rich.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top