//计算记录总数
OleDbCommand Count=new OleDbCommand("select count(id) from book",Conn);
OleDbDataReader iRCount=Count.ExecuteReader();
if(iRCount.Read())
{
iRecordCount=iRCount.GetInt32(0);
}
iRCount.Close();
Response.Write("记录总数"+iRecordCount+" ");
这样会更方便。
OleDbCommand Count=new OleDbCommand("select count(id) from book",Conn);
int count = count.ExecuteScalar();
...
Response.Write("记录总数"+count+" ");