Icon View Incident Report

Serious Serious
Reported By: Hedley Muscroft
Reported On: 4/25/2017
For: Version 2.25 Build 4
# 4506 ElevateDB .NET Data Provider Experiencing Thread Error with Remote Connections

I just updated my C# Visual Studio project from EDB 224b3 to 225b4.

None of my code has changed (apart from this update) and as soon as I launch the application, I get the following error message:

EDB Error : Thread is running or terminated; it cannot restart.

Server stack trace: 
at System.Threading.Thread.StartupSetApartmentStateInternal() 
at System.Threading.Thread.Start(StackCrawlMark& stackMark) 
at System.Threading.Thread.Start() 
at Elevate.ElevateDB.Data.Engine.TEDBThread.Start() 
at Elevate.ElevateDB.Data.Engine.TEDBThreadTimer.UpdateTimer() 
at Elevate.ElevateDB.Data.Engine.TEDBRemoteSessionManager.StartPinging() 
at Elevate.ElevateDB.Data.Engine.TEDBRemoteSessionManager.Login(String UserName, String Password) 
at Elevate.ElevateDB.Data.Engine.TEDBConnectionManager.Connect() 
at Elevate.ElevateDB.Data.EDBConnection.Open() 
at ClinicOffice.cEDBHelper.GetDatabasesAndPaths(String ConnectionStr) 

My code which triggers this is the first point at which my app opens a connection to the EDB Server, as follows :-

   static public Dictionary<string, string> GetDatabasesAndPaths(string ConnectionStr)
     Dictionary<string, string> dic = new Dictionary<string, string>();
     using (EDBConnection con = new EDBConnection(ConnectionStr))
       DataTable tbl = new DataTable();
       using (EDBDataAdapter adap = new EDBDataAdapter("select * from databases order by name", con))

       foreach (DataRow row in tbl.Rows)
         dic.Add(row["Name"].ToString(), row["Path"].ToString());
     return dic;

Resolution Resolution
Fixed Problem on 4/25/2017 in version 2.25 build 5

Products Affected Products Affected
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial