From 18a0df5965b109e18ea368033644bafbffaf0013 Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Wed, 3 Dec 2008 21:04:46 -0500 Subject: [PATCH] Catch exceptions in WvDBI_MSSQL constructor and call Dispose(). Otherwise WvDbi's destructor with assert later. --- wvdotnet/wvdbi.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/wvdotnet/wvdbi.cs b/wvdotnet/wvdbi.cs index f2c5a67..0913ac7 100644 --- a/wvdotnet/wvdbi.cs +++ b/wvdotnet/wvdbi.cs @@ -257,7 +257,16 @@ namespace Wv } log.print("MSSQL create: '{0}'\n", real); - opendb(new SqlConnection(real)); + + try + { + opendb(new SqlConnection(real)); + } + catch + { + try { Dispose(); } catch {} + throw; + } } protected override IDbCommand prepare(string sql, params object[] args) -- 2.11.4.GIT