Check if connection state is closed before opening

This commit is contained in:
2026-09-15 08:21:18 -04:00
parent 5d4e5d9a1f
commit 7c95b115e4
84 changed files with 291 additions and 291 deletions
@@ -50,7 +50,7 @@ namespace RODBInterface
SqlConnection cn = new SqlConnection(SqlConnectionStr);
try
{
cn.Open();
if (cn.State == System.Data.ConnectionState.Closed) cn.Open();
if (OnlyConnectOnce && ROAPP_SqlConnectionOnce == null) ROAPP_SqlConnectionOnce = cn;
return cn;
}