string str = "SELECT count(*) FROM InterrogationRecord WHERE Id = '" +modelrecord.Id + "' AND AskObject = '" + modelrecord.AskObject + "'";
int count = int.Parse(enote902.DBUtility.DbHelperOleDb.GetSingle(str,null).ToString());一、count(*)是表示数据的条数
二、GetSingle()是获取第一行第一列
三、注意增加变量时需要进行双引号和单引号的叠加