Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Checking wheather all conections are cut
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Checking wheather all conections are cut

 Post Reply Post Reply
Author
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Topic: Checking wheather all conections are cut
    Posted: 13 January 2004 at 5:16pm

hi guys,

does anyone know a script/code that can check that all connections to a database are closed ...... or command like abondon .....

in my script i am using the same sort of method as bruce ie adoCon.open to the db then using the strCon in the queryies..

and using

adoCon.Close
SET adoCon = Nothing
SET strCon = Nothing

but one of the script users has reported there are still connections .. i close all connections in the queryies ..... i think i do ..

is there away to see what connections they are..

am i missing something..

Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 13 January 2004 at 5:21pm
Do you mean like

If adoCon = Nothing
...
End If

Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 13 January 2004 at 5:35pm

i mean i create connections .. below is a example of the script connection system... way i have done it

adoCon.open strCon

then say make a query

rsQuery.open strSQL , strCon

rsQuery.close

adoCon.Close
SET adoCon = Nothing
SET strCon = Nothing

that is what my script uses.....

the problem is one of the users has said that the script is still leaving connections to the database open ..

i was woundering if there was a script code that i can use to see what ones are being left open...

i dont want to use it in the script i want to use it to find the connections that are left open.... so i can fix those connections....

coz if i was goning to use

if AdoCon  = nothing then

END IF

i would have seen where the problem is ...

Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 13 January 2004 at 6:49pm

Sometimes and On Error routine or a conditional redirect will leave connections open. the rule of thumb is open late, close early. You may also want to check for places where you may have closed a connection, but not destroyed it. IIRC, connections from the pool to MSSQL time out after 60 seconds. Don't know about Access.

Tip from 4guysfromrolla may help...

http://www.4guysfromrolla.com/webtech/tips/t021000-1.shtml


Lead me not into temptation... I know the short cut, follow me.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.