......
string s=....;SqlDataAdapter myCommand = new SqlDataAdapter(s, conn);
DataSet ds = new DataSet();
myCommand.Fill(ds, "count");
if(ds.Tables["count"].Rows.Count>0)
{
label1.Text=Convert.ToInt32(ds.Tables["count"].Rows[0][0]);
}
string s=....;SqlDataAdapter myCommand = new SqlDataAdapter(s, conn);
DataSet ds = new DataSet();
myCommand.Fill(ds, "count");
if(ds.Tables["count"].Rows.Count>0)
{
label1.Text=Convert.ToInt32(ds.Tables["count"].Rows[0][0]);
}
解决方案 »
- 前台怎样获取两个datetime类型的值 相差的天数
- ASP.NET能实现这种表格么?
- 大家做.NET开发时候用什么方法进行分页的啊?
- 服务器端文件夹读写的问题
- 大家看看,当点击退出按钮的时候,ASPNET用什么命令可以清空COOKEI或者SESSION的用户名可以让WEB程序退出阿
- DataGrid中传值的问题
- 散分 发布我整理的ORM开发框架CRL
- 关于如何把数据填充到excel里的问题
- 关于分布式的问题
- 大家来看看这个webform有什么问题(为方便大家检查错误,源代码已经整理过)
- 简单问题,.resx为后缀的是什么文件,当场给分
- sos!!为什么我的.net项目在本地机器上可以调试运行,而传到服务器上就运行不了了,显示错误如下,我已经在服务器上装了.net的运行环境了
{
if(myReader!=null)
myReader.Close();
Fill(str_Sql);
try
{
int count=ds.Tables[0].Rows.Count;
ds.Clear();
//myConnection.Close();
return count;
}
catch
{
ds.Clear();
//myConnection.Close();
return 0;
}
}Label1.Text=GetRowCount(sqlstr);