SQL返回值。解决方法

SQL返回值。。。stringstrSqlselectcount(*)fromrsm_framewhereroomid a1我想获得执行这条SQL语句的返回

SQL返回值。。。
string   strSql   =   "select   count(*)   from   rsm_frame   where   roomid= 'a1 ' ";
我想获得执行这条SQL语句的返回值,请问应该用什么函数?

[解决办法]
ExecuteScalar
[解决办法]
SqlCommand com=new SqlCommand( "select count(*) from rsm_frame where roomid= 'a1 ' ",con);
con.open()
int count=(int)com.ExecuteScalar();
con.close();