• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 170
  • Last Modified:

Releasing DataReport Connection

If I Preview a datareport on screen then select to either print or export it and cancel out of the print/export dialog box everything is ok

however, if I use a button to show the print/export dialog box (without first previewing) and then cancel out of the dialog box my application does not appear to disconnect the connection to the database even though I am doing this at Form_Unload.

The entire application even still remains in memory after the application is closed.

Anybody know what gives?
0
mutrus
Asked:
mutrus
  • 3
1 Solution
 
yongyihCommented:
try to set it to nothing..
e.g.

set dbConnection = nothing

Hope this can help you.  Good Luck. ^_^
0
 
mutrusAuthor Commented:
That was already being done in Form_Unload (form that called report) and also directly after the command that called the report

I also notice that a similar thing occurs when selecting print from a print preview and the printer errors (my example had the printer turned off). maybe I should be error trapping in the report?
0
 
mutrusAuthor Commented:
Well no other answers so points are yours
0
 
mutrusAuthor Commented:
Well no other answers so points are yours
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now