原文链接:http://bbs.csdn.net/topics/90499556
判断方法为:
OleDbConnection con=new OleDbConnection("连接字符串");
string name="test";
con.Open();
OleDbCommand cmd=new OleDbCommand("select count(*) from studentDetails where sname='"+name+"'",con);
int count=Convert.ToInt32(cmd.ExecuteScalar());
con.Close();
if (count>0)
{
//说明记录存在..
}
else
{
//说明记录不存在..
}