日期:2014-05-19  浏览次数:20484 次

用SqlDataSource在Page_Load中select()出错?
我想在页面打开时打开SqlDataSource,以便获取数据库的值

在Page_Load中的语句

this.SqlDataSource1.SelectCommand   =   "SELECT   [用户登陆名],   [地址]   FROM   [UserInfo]   where   [用户登陆名]= 'abc ' ";

this.SqlDataSource1.Select();       //报错


错误信息:
“Select”方法没有采用“0”个参数的重载错误信息


请问如何解决???

------解决方案--------------------
这个还没用过,一直在用XSD+ObjectDataSource
------解决方案--------------------
this.SqlDataSource1.Select(new DataSourceSelectArguments());

*****************************************************************************
欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码)

最新版本:20070212

http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html
------解决方案--------------------
feiyun0112(http://feiyun0112.cnblogs.com/) 楼上正解
------解决方案--------------------
不是说了吗?参数问题.楼上正解
------解决方案--------------------
up
------解决方案--------------------
ding
------解决方案--------------------
this.SqlDataSource1.Select(DataSourceSelectArguments.Empty);