-
Mar 15th, 2013, 02:17 PM
#1
Thread Starter
New Member
Close all connection on exit
Hi,
I'm relative new in vb.net programming, so I have some questions.
I have an application that connects to an oracle server to retrieve some records from tables.
Everything is working well. But I would prevent some problems.
Is there a possibility to close all recordsets and the connection to the oracle server, if the computer on which the application is running, is in the LogOff/ShutDown procedure (and the application was not closed), or, for some reason the application is stop working properly (stop responding)?
-
Mar 15th, 2013, 07:19 PM
#2
Re: Close all connection on exit
How are you connecting to the database?
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Mar 16th, 2013, 03:42 PM
#3
Thread Starter
New Member
Re: Close all connection on exit
-
Mar 19th, 2013, 02:43 AM
#4
Re: Close all connection on exit
I would suggest instead of ADODB that you will use ADO.Net, and remember the rule of "open as late as possible, close as early as possible" which means you need to open your connection only when you need it and close it again after using it, as such you will not be keeping any connection open.
-
Mar 19th, 2013, 09:47 AM
#5
Re: Close all connection on exit
Another way to achieve this is purely at the database level, where you could CREATE A PROFILE.
Assign this profile to all your users. Then if the user is IDLE for the amount of time specified in the IDLE_TIME parameter, the server will disconnect the user.
This approach does not require any changes to your front-end code. You do need help from the DBA and or system level permissions on the database to achieve this.
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
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
|