Click here to Skip to main content
14,971,553 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can I do the following number 4 and 5 task using client server socket programming?
1. Client send a query as regular text to the server. [I can do this]
2. Server get the SQL from the client. [I can do this]
3. Server execute the query(Select statement). [I can do this]
4. Server return the query result as datatable or dataset to the client [How can I do this]
5. Client get the datatable or dataset and display to the client side.[How can I do this]
Please help me guys I have to submit my project very soon
Posted

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[^]
   
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();
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900