Results 1 to 5 of 5

Thread: how to close all available database connection

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    http://www.vbforums.com
    Posts
    164

    how to close all available database connection

    i would like to know what command or source code is needed to close all available database connection in an aplication. pls help
    "If ignorance is bliss, that probably explain why I'm in a such a mess right now!!"

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Code:
    'DAO
    dbobject.Close
    'ADO
    connobject.Close

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    http://www.vbforums.com
    Posts
    164
    thanks for ur help. but the code wont help if i wanted to close connection from other forms which the variable is not global. is there any command which i can use to close all connection from other forms.help is really needed
    "If ignorance is bliss, that probably explain why I'm in a such a mess right now!!"

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    If it is your project, and your objects, they should be available.

    Either make the public, and close them all at once, or make them form level, and close them when the form unloads.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    http://www.vbforums.com
    Posts
    164
    When the form unloads, what function will it triggers?

    I mean...how do I set that whenever a form unloads....it will close the connection?
    "If ignorance is bliss, that probably explain why I'm in a such a mess right now!!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width