复制代码 代码如下:
int i;
for( i=0; i<100;i++)
{
// codeing
}
复制代码 代码如下:
SqlConnection con = new SqlConnection(connString);
string strcmd = "select top 1 classid,classname where cms_class";
SqlCommand cmd = new SqlCommand(strcmd, con);
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
int numberId, numberName;
numberId = Convert.ToInt32(dr.GetOrdinal("classid"));
numberName = Convert.ToInt32(dr.GetOrdinal("classname"));
con.Close();
if (dr.Read())
{
string result = dr.GetSqlString(numberId) + " | " + dr.GetSqlString(numberName);
}
dr.Close();
新闻热点
疑难解答
图片精选