Disconnect connection to database in code

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Disconnect connection to database in code

    I need to include a statement in my code to "disconnect the connection to the
    database once you have fetched the data necessary". I researched the
    ColdFusion support area and found cfusion_dbconnections_flush(); but this has
    been deprecated in ColdFusion MX.

    What is the replacement for the above function? I researched this message
    board and found question asking about this function in 2004 that had not been
    answered.



    lwd Guest

  2. Similar Questions and Discussions

    1. Disconnect Database Immediately with 0 timeout
      If you set the timeout to 0 in Advanced Settings for a data set, will this disconnect the data source immediately after it is used? For security...
    2. Maybe Database connection pools should be managed by Admins instead of Developers using Code?
      This would be something that 2003 server and ASP.Net would use, ie, another section of the IIS whereas you could manage connection strings and such...
    3. prompted to disconnect from a dial-up connection.
      Hi ! How do you set up a Network connection so that you are prompted to disconnect from a dial-up connection, and can you set it up to automatic...
    4. disconnect network connection from host PC
      How can I temporarily disconnect a network connection for a network desktop while sitting at my Host (XP Pro) machine without losing the mapping. I...
    5. SpeedStep cause dial-up connection auto disconnect
      Hi, I got a problem with Intel P4 CPU and WinXP Home on notebook, and the Modem is Askey on-board, the problem is after I connect system to ISP,...
  3. #2

    Default Re: Disconnect connection to database in code

    I am also trying to break connections to our databases. We need to disconnect to all of them at the same time so we can back them up regularly. Any ideas on how this can be done, now?
    palibrarian Guest

  4. #3

    Default Re: Disconnect connection to database in code

    Well, you could de-select the Maintain Connections in your data source setup in
    CF administrator, so your database connections only last as long as needed. I
    suppose that you may pay a performance penalty, but I have ALL of my data
    sources set up this way (Oracle, MS SQL, and Access), and have never had any
    significant performance issues. However, this is all dependent on your own
    situation.

    Phil

    paross1 Guest

  5. #4

    Default Re: Disconnect connection to database in code

    For disconnecting individual data sources, the best bet is to configure them
    with a short timeout.

    In extreme cases, you could use the admin API (CF7) or service factory
    (earlier CF) to destroy the datasource and then recreate it dynamically.

    For disconnecting all DSN's at once, use the admin API to stop the ODBC
    service.

    More information on the admin API is
    [url]http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=7&thread[/url]
    id=912668#3259306

    Good Luck,
    -- MikeR

    MikerRoo Guest

Posting Permissions

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

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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139