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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dropping a database connection

Status
Not open for further replies.

dawolter

Programmer
Dec 20, 2000
3
US
I have a vb6 app that front-ends a number of crystal 8.5 reports. I recently noticed that after each report runs, its connection to the Oracle 8i database persists. My reports are unbound. At runtime I create ado recordsets that I use to bind my reports. Is there a way to force a connection termination as the report is closed? Setting the report object = nothing does not do this
 
There is a way to force a connection to be closed. Ensure that you keep the ADO connection objects scope to procedure level and always close it and also (for extra safety, not that I don't trust VB's rubbish collection) set it to equal nothing, after finishing with your report.

This will close the connection down regardless of Crystal.

I've been doing pretty much the same thing with unbound reports - I've been trying to get a disconnected recordset working with crystal and yep it needs the connection.

In fact - I do stand to be corrected here - but it seems as though Crystal takes my nicely populated recordset and reruns the base SQL as soon as it gets its mitts on the object:)

So I'm stuck with using 'connected' recordsets :-(

Jon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top