1、判断列名
DataTable t = new DataTable();
DataColumn col = new DataColumn("aaa");
t.Columns.Add(col);
col = new DataColumn("bbb");
t.Columns.Add(col);
col = new DataColumn("c");
t.Columns.Add(col);
bool b = t.Columns.Contains("bbb");
2、判断具体数据
if (表名.Select("列名='具体数据'").Length > 0)
{
sr.errcode = 0;
sr.msg = "该数据已经存在";
return sr;
}