读书人

Web Service返回DataSet在测试时没有关

发布时间: 2012-01-11 22:28:46 作者: rapoo

Web Service返回DataSet在测试时没问题,但在客户端调用时出错!
这是客户端调用的代码:
webDataSet.ServiceDemo webDemo = new webDataSet.ServiceDemo();
DataSet ds = new DataSet();
ds = webDemo.GetDataSet( "aa ");
GridView1.DataSource = ds;
GridView1.DataBind();

这是服务端返回的代码:
DataSet ds = new DataSet();
SqlConnection cn = new SqlConnection( "Data source=.; initial catalog=RssDB; integrated security=true; ");
cn.Open();
SqlCommand sc = new SqlCommand();
sc.Connection = cn;
sc.CommandText = "select * from RssStore ";

SqlDataAdapter sqlDa = new SqlDataAdapter();
sqlDa.SelectCommand = sc;
sqlDa.Fill(ds);
return ds;


[解决办法]
没发现服务端 方法有参数呀?


[解决办法]
我做了个测试,貌似没有什么问题

读书人网 >Web Service

热点推荐