https://github.com/karenpayneoregon/sqlserver-connection-timeout
Code sample which sets a timeout on a SqlConnection which constrains opening a connection to a four second time period which is adjustable.
https://github.com/karenpayneoregon/sqlserver-connection-timeout
csharp sql sql-server
Last synced: about 1 year ago
JSON representation
Code sample which sets a timeout on a SqlConnection which constrains opening a connection to a four second time period which is adjustable.
- Host: GitHub
- URL: https://github.com/karenpayneoregon/sqlserver-connection-timeout
- Owner: karenpayneoregon
- Created: 2021-02-15T01:05:32.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-09T18:19:15.000Z (over 2 years ago)
- Last Synced: 2025-01-29T00:29:01.520Z (about 1 year ago)
- Topics: csharp, sql, sql-server
- Language: C#
- Homepage:
- Size: 102 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# About
Code sample which sets a timeout on a SqlConnection which constrains opening a connection to a four second time period which is adjustable.
This can assist when there is a failure to connection to a SQL-Server where without a timeout will timeout in 30 or more seconds which can be a lifetime for a user.
:heavy_check_mark: On connection failure the exception is written to a log file for SqlServerAsyncRead project.
:green_circle: SqlServerAsyncRead recommended with connections that may fail.
:red_circle: SqlServerConventional do not use if a connection may fail
# Microsoft TechNet article
https://social.technet.microsoft.com/wiki/contents/articles/54260.sql-server-friezes-when-connecting-c.aspx