Should I always use connection.close

  • Should I always close my db connection or close automatically?

  • What happens if I don’t close it?

  • How can I close the connection in case of asp error? I do not want to use the "on error goto next" command, but stop the script if an error occurs.

  • How is automatic closure different from SQL Server 2008 and 2012?

+3
source share
1 answer
  • Yes, you should always try to close everything that you open. By doing this as early as possible, resources are allocated in the code that can be reused by other requests.

  • , , , ASP- ( , , ), , script . , , , .

  • . , script , , .

  • . ASP ADODB SQL Server, .

+4

Source: https://habr.com/ru/post/1785340/


All Articles