T
TuceG
Guest
I have a c# Application that is connected to a SQL Server 2012 using ODBC Connection
Mars is enabled already but some users see
ERROR [HY000] [Microsoft][SQL Server Native Client 11.0]Connection is busy with results for another command
How can I solve this?
public void GetSettings(int rc, DBValues z) {
string query = String.Format(@"SELECT
NumberPoints,
Voltage,
Current,
Version
WHERE device.Id = diagnostic.DeviceId and device.Id={0}
ORDER BY diagnostic.CreateDate DESC", rc.Id);
DataSet ds = new DataSet();
ds.Clear();
OdbcDataAdapter da = new OdbcDataAdapter(query, dbcnn);
da.Fill(ds);
//
if (ds != null && ds.Tables.Count != 0 && ds.Tables[0].Rows.Count != 0)
{
z.NumberPoints = Convert.ToInt32(ds.Tables[0].Rows[0]["NumberPoints"]);
z.Voltage = (float)Convert.ToDouble(ds.Tables[0].Rows[0]["Voltage"]);
z.Current = (float)Convert.ToDouble(ds.Tables[0].Rows[0]["Current"]);
string algVersion = ds.Tables[0].Rows[0]["Version"].ToString().Trim();
}
}
Continue reading...