Returning datatable/dataset by from server in a Multithread Client server socket programming
-
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]
-
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]
1. Don't write everything in bold. It's a plain message, so it's wise to use plain text.
dokhinahaoa wrote:
Server return the query result as datatable or dataset to the client
Serialize it into XML, that should do the trick.
dokhinahaoa wrote:
Client get the datatable or dataset and display to the client side.
Deserialize your dataset :)
I are Troll :)
-
1. Don't write everything in bold. It's a plain message, so it's wise to use plain text.
dokhinahaoa wrote:
Server return the query result as datatable or dataset to the client
Serialize it into XML, that should do the trick.
dokhinahaoa wrote:
Client get the datatable or dataset and display to the client side.
Deserialize your dataset :)
I are Troll :)
Sorry !!! Can I have sample code for that??
-
Sorry !!! Can I have sample code for that??
dokhinahaoa wrote:
Can I have sample code for that??
You'd best start here[^], samples can be obtained here[^]. Basically, you transform an object into XML (or binary), send it, and rebuild the class on the receiving end. Something like this;
"Class X -> becomes XML -> gets send -> gets received -> receiver makes class from XML"
Enjoy :)
I are Troll :)