请看一下这个异常,多谢各位。数据库读取出来信息之后报错

请看一下这个错误,谢谢各位。数据库读取出来信息之后报错
 string strcon = "server=sxsoft2;database=wu;uid=sa;pwd=11";
        string strsum = "select null as name,null as text,null as time,null as id,sum(money) as money from tableGet";
        string strall = "select name,text,time,id,money from tableGet";
        public Form1()
        {
            InitializeComponent();
            DataTable table = new DataTable();
            table = ser.getDataSource(strsum);
            MessageBox.Show(table.Rows.Count.ToString());

        }
按道理应该有一行数据写进去的,但是这边报错。。。。。。。
请看一下这个异常,多谢各位。数据库读取出来信息之后报错请看一下这个异常,多谢各位。数据库读取出来信息之后报错

------解决方案--------------------
table 为空吧
------解决方案--------------------
strsum放到查询分析器里执行下看看
------解决方案--------------------
你跟踪进ser.getDataSource看看
  
*****************************************************************************
签名档: http://feiyun0112.cnblogs.com/
------解决方案--------------------
>=1 

你的代码写错了
------解决方案--------------------
你那不明显都返回null了么?

为什么要判断count>1?
==1的时候不就返回null了么?
------解决方案--------------------
版主说了

if(dst.Tables[0].Rows.Count>=1) //源代码条件>1 把1条数据的情况给排除了
{
    return dst.Tables[0];
}
else
{
    return null;
}