|
-
Oct 16th, 2003, 08:15 AM
#1
Thread Starter
Frenzied Member
database connections
how come when I execute the close command from my app, my connection stays open. I've used:
objcon.close
objcon.dispose
objcon = nothing
when I look in Oracle my connection seems to stay open for about 30 seconds after the close command is executed, then closes...shouldn't they close right away when the close command is executed in the app?
It's tough being an unhandled exception...
___________
VB.NET 2008
VB.NET 2010
ORACLE 11g
CRYSTAL 11
-
Oct 16th, 2003, 10:09 AM
#2
Thread Starter
Frenzied Member
when I logon I have four separate connections. One to check if the server is running..one to validate userid...another to validate password and another to make sure they are using the right database....is there a way I can do this with one connection in .net?
It's tough being an unhandled exception...
___________
VB.NET 2008
VB.NET 2010
ORACLE 11g
CRYSTAL 11
-
Oct 16th, 2003, 02:47 PM
#3
Fanatic Member
with regards to first post......is this part of connection pooling? Where you can use the same connection again and again even tho you may think it has been closed?
Not exactly sure if this is right so would like to hear what others think???
-
Oct 16th, 2003, 04:36 PM
#4
Fanatic Member
I came across the same thing. The connection will disappear if you close your app right?
I think it is Connection Pooling. But make sure that you are closing all of your connections. In my case, I did a .open and then used an adapter, which leaves the connection in the state that it was in - and I thought it would close it, but it wasn't. Talk about connections! WOW!
If you know you will never reuse the connection you can turn pooling off by add the following at the end of your connection string:
If you do that then it will dissapear.
-
Oct 16th, 2003, 05:15 PM
#5
Fanatic Member
connection pooling is the way forward!!! It means you don;t have to open 1 connection when the app starts and then close it when it finishes.
You can open and close the connection as much as you want and the time delay will be minimal.
-
Oct 17th, 2003, 07:39 AM
#6
Thread Starter
Frenzied Member
I added pooling=false at the end of my connection string and it gave me another connection
VB Code:
Dim strconn As String = "Provider=MSDAORA;Password=" & password & ";User ID=" & Name & _
";Data Source=" & db & ";pooling=false"
It's tough being an unhandled exception...
___________
VB.NET 2008
VB.NET 2010
ORACLE 11g
CRYSTAL 11
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|