【Vegas原创】善用try catch
string strsql = ".......";
try
{
DataSet ds = db.GetDataSet(strsql);
strText = ds.Tables[0].Rows[0][0].ToString() + "%";
}
catch
{
strText = "ERROR";
}
try
{
DataSet ds = db.GetDataSet(strsql);
strText = ds.Tables[0].Rows[0][0].ToString() + "%";
}
catch
{
strText = "ERROR";
}
喜欢请赞赏一下啦^_^