且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从多线程客户端服务器套接字中的服务器返回数据表/数据集

更新时间:2023-01-18 09:54:27

要填充数据集,请查看以下内容:http://msdn.microsoft.com/en-us/library/377a8x4t.aspx [ http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.aspx [ ^ ]
For filling the dataset, have you had a look at this: http://msdn.microsoft.com/en-us/library/377a8x4t.aspx[^]

And for displaying the result, it depends what technology you use (WinForms, WPF, ...) and what requirement you have but for example this control may help you http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.aspx[^]



您需要dataadapter来填充数据集

SqlDataAdapter da =新的SqlDataAdapter(CommandObj,ConnectionObj)
da.fill(ds);

要显示数据,您需要诸如GridView,Repeater,dataList之类的控件

现在您必须将该数据集绑定到gridview或repeater,例如

gridView.DataSource = ds;
gridView.DataBind();
hi
You need dataadapter to fill the dataset

SqlDataAdapter da = new SqlDataAdapter(CommandObj,ConnectionObj)
da.fill(ds);

to diplay the data you need controls like GridView,Repeater,dataList

now you have to bind that dataset to gridview or repeater like

gridView.DataSource= ds;
gridView.DataBind();