Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Re: Connect to DB

Reply
 
Old 08-28-2008   #1 (permalink)
Mark


 
 

Re: Connect to DB

Set oConn = Nothing?
Please forgive my ignorance…. Why does one close the connection, and
where/how should this be done?
Thanks,
Mark


My System SpecsSystem Spec
Old 08-28-2008   #2 (permalink)
Richard Mueller [MVP]


 
 

Re: Connect to DB

Mark wrote:
Quote:

> Set oConn = Nothing?
> Please forgive my ignorance…. Why does one close the connection, and
> where/how should this be done?
When the connection object is no longer needed I use:

oConn.Close

I believe the connection gets closed when the script ends, but I like to
make sure. There is no need to set the object reference to Nothing. I know
that if you fail to close files, they can remain open. I like to be safe
with connection objects as well and make sure they get closed. The exact
behavior may depend on the DBMS and driver used.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Can Connect to Router but unable to connect to internet Vista networking & sharing
"Connect automatically" checkmark disappears from "Dial-up Connect Vista installation & setup
"Connect automatically" checkmark disappears from "Dial-up Connect Vista networking & sharing
Can't connect to the internet, 3rd BRAND NEW computer that work connect! HELP! Network & Sharing
Re: Can't Connect to Juniper Network Connect 5.4.0 Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46