开发者

combine multiple DataViews into a single one?

I have 4 different select statements which i sequently assign to an sqlDataSource like this:

sqlNoutatiProduse.SelectCommand = select;

and i keep the results in different DataViews like

MySession.Current.d开发者_JAVA百科ataViewNoutatiProduse1 = (System.Data.DataView)sqlNoutatiProduse.Select(DataSourceSelectArguments.Empty);

and so on.

Is it possible to combine into a single DataView the results of these queries?


Without more details, this is the best generic answer I can give...

It's possible to create a DataTable manually, add the columns you need, and then loop through the DataViews to add records to your new table. I've used this technique where I can't do the work at the DB level. However, this would be horribly inefficient.

You'd be better off seeing if you can get the data you want it directly from the DB.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜