public int getcom(string M_str_sqlstr)
{
int32 count=0;
SqlConnection sqlcon = this.getcon();
sqlcon.Open();
SqlCommand sqlcom = new SqlCommand(M_str_sqlstr, sqlcon);
count = (int32)sqlcom.ExecuteScalar();
sqlcom.Dispose();
sqlcon.Close();
sqlcon.Dispose();
return (int)count;
}
看行不行......