ASP.NET循环读取数据
用的是C#stringsqltotal="selectsum(num)fromstockwheremodules='"+modules.Text.Trim()+"'and...
用的是C#
string sqltotal = "select sum(num) from stock where modules='" + modules.Text.Trim() + "' and stockarea='" + stockarea.SelectedValue.Trim() + "' and state='" + state.SelectedValue.Trim() + "' and remark='" + remark.Text.Trim() + "'";
SqlDataAdapter datotal = new SqlDataAdapter(sqltotal, strCon);
DataSet dstotal = new DataSet();
datotal.Fill(dstotal, sqltotal);
do while not rs3.eof
rs3.movenext
loop
这些话在C#该怎么写 展开
string sqltotal = "select sum(num) from stock where modules='" + modules.Text.Trim() + "' and stockarea='" + stockarea.SelectedValue.Trim() + "' and state='" + state.SelectedValue.Trim() + "' and remark='" + remark.Text.Trim() + "'";
SqlDataAdapter datotal = new SqlDataAdapter(sqltotal, strCon);
DataSet dstotal = new DataSet();
datotal.Fill(dstotal, sqltotal);
do while not rs3.eof
rs3.movenext
loop
这些话在C#该怎么写 展开
3个回答
展开全部
string sqltotal = "select sum(num) from stock where modules='" + modules.Text.Trim() + "' and stockarea='" + stockarea.SelectedValue.Trim() + "' and state='" + state.SelectedValue.Trim() + "' and remark='" + remark.Text.Trim() + "'";
SqlDataAdapter datotal = new SqlDataAdapter(sqltotal, strCon);
DataSet dstotal = new DataSet();
datotal.Fill(dstotal, sqltotal);
while (rs.read())
{
}
SqlDataAdapter datotal = new SqlDataAdapter(sqltotal, strCon);
DataSet dstotal = new DataSet();
datotal.Fill(dstotal, sqltotal);
while (rs.read())
{
}
展开全部
string sqltotal = "select sum(num) from stock where modules='" + modules.Text.Trim() + "' and stockarea='" + stockarea.SelectedValue.Trim() + "' and state='" + state.SelectedValue.Trim() + "' and remark='" + remark.Text.Trim() + "'";
SqlDataAdapter datotal = new SqlDataAdapter(sqltotal, strCon);
DataSet dstotal = new DataSet();
datotal.Fill(dstotal, sqltotal);
int sum=0;
for (int i=0;i<dstotal.rows.count;i++)
{
sum=Convert.ToInt32(rows[i][0])
}
SqlDataAdapter datotal = new SqlDataAdapter(sqltotal, strCon);
DataSet dstotal = new DataSet();
datotal.Fill(dstotal, sqltotal);
int sum=0;
for (int i=0;i<dstotal.rows.count;i++)
{
sum=Convert.ToInt32(rows[i][0])
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2011-12-01
展开全部
u建议
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询