Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
I am creating a web application in vb.net. I want to send more than 200 records from server to client, so I have stored all the records in the dataset object and sending that object through socket. Now I know that I should serialize the object & send it through socket, but I am facing problem.
Here is my code:
sql = "Select Transaction_ID,Log_Date,Log_Time,Client_Action,Remarks from ClientLogs  where Account_No=" & ClientAccountNumber & ""
                          dataadapter = New OleDbDataAdapter(sql, connection)
                          dataadapter.Fill(dataset, "ClientLogs")
                          connection.Close()
                          dataadapter.Dispose()
                         
                          Dim send_to_client As Byte()
                          send_to_client = Encoding.ASCII.GetBytes(dataset & Chr(13))
                          networkStream.Write(send_to_client, 0, send_to_client.Length)
                          networkStream.Flush()
 
I have very little idea about binary serialization(I don't want xml serialization).
I tried to collect some info about <serializable()> but I didn't get much.Is there any way to send the data set object through socket using serializable class and deserialize the dataset object oat the server side.
In my project, database is at server side .
 
Any constructive suggestions are welcome.
Thanking you in advance
Posted 8-May-11 22:48pm
Pratso388
Edited 8-May-11 22:49pm
v2
Comments
Simon_Whale at 9-May-11 5:39am
   
what are you using to read the byte array?

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

  Print Answers RSS
0 OriginalGriff 587
1 Sergey Alexandrovich Kryukov 479
2 Maciej Los 305
3 Mathew Soji 195
4 Richard MacCutchan 145
0 OriginalGriff 7,356
1 Sergey Alexandrovich Kryukov 6,712
2 DamithSL 5,461
3 Manas Bhardwaj 4,916
4 Maciej Los 4,475


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 9 May 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100