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

How to delete session ?

Status
Not open for further replies.

Lemox

Programmer
Dec 13, 2003
67
GB
Hi there,

I generate a crystal report picking data in an Oracle db via VB6.
As the "MyReport.Export" occurs, a new session is automatically created by Crystal.
When the report is done, performing :

Set MyCRApp = Nothing
Set MyCRRep = Nothing

doesn't kill the session, which is still active when I shut my VB app.
So, sessions are added each time and after a few time, I can no longer connect to Oracle : "memory leak - large pool..."

Maybe I could use "MyCRApp.LogOffServer" but I can't easily figure out what parameters I have to provide, especially for pdllName.

Can someone help me ?

Thanks in advance.
Lemox
 
Well, the problem only happens if I generate the report in VB environnement : making an exe solves the problem (session deleted).

Don't understand but most important is that it works with my exe...
 
Dave,
Thanks : useful document...

But there's still sthg I can't figure out with the SetLogOnInfo : I don't use a ServerName.
My app has one parameter giving the TNSName of the Oracle db so I can make the app run on different servers.

But this is not the name of the server which lies in the TNSNames.ora file itself ! It's just part of an alias !

So I cannot know server name from my app.
I tried to provide an empty string and give the optional databasename param but I get an error with "MyRep.Export" :
"Not supported.
Details: Fail to execute SQL statement. OCI Call: OCIStmtExecute".

Same error by providing TNSName as Server name...

Could you explain ?

Many thanks !
Lemox
 
Dave,

FYI : I never used LogOnServer.

I just put this line of code :
Report.Database.Tables(1).ConnectionProperties.item("Password") = "wordpass".

And I don't like so much putting passwords in my VB code so it would be really nice to make this line disappear ;-)

Lemox
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top