高分 在线等 如何利用dataset 返回一个int值 for(int i=0;i<ds.Tables[0].Rows.Count;i++){ ……} 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 int.Parse(ds.Tables[0].Rows[0]["co"].ToString()) string n=ds.Tables[0].Rows[0]["co"].ToString();int i=Convert.ToInt32(n);///强制转换。for(i=n;i>0;i--){.........ds.Tables[0].Rows.Count;///行数。ds.Tables[0].Columns.Count;///列数。不知道你问的是什么?请详细描述。 int aintnum= (int)ds.Tables[0].Rows[0]["co"];即可如果原来的类型不是int就用int.Parse(ds.Tables[0].Rows[0]["co"].ToString())不知道你问的是不是这个意思? string strCmd = "Select * From TableName";string strCon = System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"];System.Data.SqlClient.SqlConnection objCon = new SqlConnection(strCon);System.Data.SqlClient.SqlDataAdapter objAda = new SqlDataAdapter(strCmd,objCon);DataSet objSet = new DataSet();objAda.Fill(objSet,"Table1");DataTable ds = objSet.Table["Table1"];int i = int.Parse(ds.Tables[0].Rows[0]["co"].ToString());for(i=n;i>0;i--){......... 瑞星卡卡拦截webservice 如何利用asp.net中的正则,查出字符串中的日期格式进行替换 利用post打开新页面后,上传控件 不触发后台代码 一个经典的上传问题 请教 ,两条折线统计图的问题 關於CrystalReport的一個小問題 ▲▲▲简单问题,datalist能否自动生成编号 MessageBox.Show 问题 调用存储过程返回记录集的问题 对方给出SQL Server的用户名和密码,请问如何把数据库放到远程的虚拟主机上?详细操作。 客户端怎么把一个文件直接存入服务器的BLOB字端里。(不能先上传临时目录再存)急 请教:Web页面上弹出带逻辑处理的窗体???
int i=Convert.ToInt32(n);///强制转换。
for(i=n;i>0;i--)
{
.........
ds.Tables[0].Rows.Count;///行数。
ds.Tables[0].Columns.Count;///列数。
不知道你问的是什么?请详细描述。
就用int.Parse(ds.Tables[0].Rows[0]["co"].ToString())不知道你问的是不是这个意思?
string strCon = System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"];
System.Data.SqlClient.SqlConnection objCon = new SqlConnection(strCon);
System.Data.SqlClient.SqlDataAdapter objAda = new SqlDataAdapter(strCmd,objCon);
DataSet objSet = new DataSet();
objAda.Fill(objSet,"Table1");
DataTable ds = objSet.Table["Table1"];
int i = int.Parse(ds.Tables[0].Rows[0]["co"].ToString());for(i=n;i>0;i--)
{
.........