日期:2014-05-16 浏览次数:20845 次
try
{
myConnection.Open();
MySqlCommand myCommand = myConnection.CreateCommand();
if (name != null)
{
myCommand.CommandText = "SELECT top 1 * from warnTable WHERE NAME='" + name + "' order by addtime desc";
//判断是否查找成功
MySqlDataReader getValue = myCommand.ExecuteReader();
if (getValue.Read())
{
dataValue = Convert.ToInt32(getValue["value"].ToString().Trim());
}
}
else
{
throw new Exception("DeHelper GetDataTime Error");
}
}
catch
{
throw new Exception("DeHelper GetDataTime Error Open");
}
"SELECT top 1 * from warnTable WHERE NAME='" + name + "' order by addtime desc";