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

Crystal Reports and the LogOffServer method

Status
Not open for further replies.

graymond

Programmer
Jan 19, 2005
2
US
In Crystal Reports 8.5, there was a problem with the method 'LogOffServer'. I would like to know if that problem was fixed in crystal Reports 10. We use VB 6.0, the database is Oracle.

Thanks
 
What was the problem with it in 8.5, besides it leaving db connections open until LogOffServer is called?

If that's what you mean, then consider using the SetLogOnInfo method instead. It's decprecated, but still works in CR 10, and doesn't leave connections open. See faq768-5374 for an example.

-dave
 
Dave.

In 8.5, the connection does not close after using the 'LogOffserver' method, the connection is still active and it stays like that for a while sometimes hours. It was not a problem up until now: the client has a new requirement that each user cannot have more than 8 connections to Oracle. If a user runs many reports, the connection limit is reached and he receives an error message from Oracle stating that the limit has been reached. We are using the LogOnServer method to connect so I tried using the LogOffServer method to disconnect but it does not work. I was wondering if upgrading to CR 10 would solve the problem meaning that 'LogOffServer' works in CR 10. If not, we will need to change the VB code.

Thanks for the article: I will try the SetLogOnInfo.


 
I've never used the LogOn/OffServer method for that reason. According to the Help files, the connection should also close when the CRAXDRT.Application object is destroyed, so perhaps you could also attempt to solve your current problem be destoying the Application object after each report run. Of course, you'd also need to change up your code a bit to reinstantiate the Application object every time you're going to load a report.

I don't use Oracle, but I've created many applications integrating with CR, and have always had success with SetLogOnInfo.

-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top