Server Not Yet Opened Error & Unable to Log off
Posted on 2004-08-19
Can you give me a hand?
I'm using VB6, CR8.5 and Oracle 8.1.7
I'm using ADO to call the stored proc from VB.
And RDC to invoke the Crystal Reports.
The reports datasource is defined via ODBC.
I invoke a set of reports, and have noticed that my DB connections are not closed.
In the end, this reaches the maximum number of session allowed on the DB and hence leads to the Server Not Yet Opened Error.
However, if I try to use the LogOffServer method - I get a Unable to log off error!!!
So, how do I close my DB connection?
Here is some sample of the ReportToFile function that I call multiple times:
Set craxApp = New CRAXDRT.Application
Set craxReport = New CRAXDRT.Report
Set craxReport = craxApp.OpenReport(p_sReportPath & sReportName)
craxReport.ExportOptions.DiskFileName = p_sDestinationPath & sDestinationFileName & p_sFileExtension
craxReport.ExportOptions.DestinationType = crEDTDiskFile
craxReport.ExportOptions.FormatType = crEFTExcel80
craxReport.Database.LogOnServer "p2sodbc.dll", "MyDB", , GL_ORACLE_UserID, GL_ORACLE_Password
craxReport.DisplayProgressDialog = False
Set craxApp = Nothing
Set craxReport = Nothing
Thanks in advance for your assistance.