Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronald-Mulder committed May 17, 2018
1 parent 1afeec9 commit 74732aa
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions PostGIS3DExplorer/FrmConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,14 @@ private void TestConnection(PostGISConnectionParams pPostGISConnectionParams)

try
{
lblLoginStatus.Text = pPostGISConnectionParams.TestConnection();
DBHelper pDBHelper = new DBHelper(pPostGISConnectionParams);

lblLoginStatus.Text = pDBHelper.GetSingleResultQuery("select version();").ToString();

lblExtension1.Text = "postgis";
lblExtension2.Text = "postgis_sfcgal";

DataTable pExtensions = new DBHelper(pPostGISConnectionParams).PostGISExtensions();
DataTable pExtensions = pDBHelper.PostGISExtensions();
foreach (DataRow pDataRow in pExtensions.Rows)
{
if (pDataRow.Field<string>("name") == lblExtension1.Text)
Expand All @@ -170,7 +172,8 @@ private void TestConnection(PostGISConnectionParams pPostGISConnectionParams)
lblExtension2.Text += " (" + pDataRow.Field<string>("installed_version") + ")";
}
}

pDBHelper.Connection.Close();
pDBHelper = null;
}
catch (Exception ex)
{
Expand Down

0 comments on commit 74732aa

Please sign in to comment.