Print Page | Close Window

OCX control closing too many connections

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2022
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=11363
Printed Date: 03 May 2025 at 2:32am


Topic: OCX control closing too many connections
Posted By: andrewv_dmi
Subject: OCX control closing too many connections
Date Posted: 07 Oct 2010 at 11:02am
Has anyone else seen anything like this?  When I close the screen from which the report was run, all of my database connections close -- not just the one that the report was using.
 
I'm using CR 8.5 through the OCX control in a J++ (java) application. 
 
The application has two ODBC connections, CRGUP2 (goes to a SQLBase 6 database) and AGV_FIN (goes to a MySql 4.1 database).  The report uses the AGV_FIN connection and only that.  The connection string being passed to the OCX control is the AGV_FIN connection.
 
I can run as many reports as I like, and the connections stay open -- until I close the reports screen (contains the OCX control, different from CR's preview window, written by me in java).  Then the CRGUP2 connection closes.  The report's AGV_FIN connection is also closed, but other AGV_FIN connections for the application remain as they were.
 
I have tried rebooting.  The boss requires us to use these versions because newer versions break this-or-that.
 
Has anybody seen anything like this before?  Help or at least confirmation that it's not just me would be welcome.
 
-Andrew Vick



Replies:
Posted By: andrewv_dmi
Date Posted: 08 Oct 2010 at 11:05am
I found a workaround: put the OCX control on the application's main window.  That way, the OCX's window doesn't close untill the application is exiting.
 
-Andrew Vick



Print Page | Close Window