Hi,
I am working with VB Client/Server application with winsock control. I want to pass recordset (100 records) from server to client. Let me know how to pass those records and group it in client and assign it to data grid.
Thanks in advance.
Printable View
Hi,
I am working with VB Client/Server application with winsock control. I want to pass recordset (100 records) from server to client. Let me know how to pass those records and group it in client and assign it to data grid.
Thanks in advance.
.
(Misunderstood question)
Use the recordset.GetRows function to copy the data into a Variant
Add that Variant data to a PropertyBag, then copy the data from PropertyBag.Contents to a byte array.
Sent the byte array through winsock
When you want to read the data, you have to get the byte array, them copy it into a PropertyBag using the Contents property. Then read the Variant data.
Once you have the data into a Variant, then display it by looping through the double array (the rows & columns of the recordset)
The standard approach is to do Recordset.Save into an ADO Stream object. Then you can use Stream.Read to retrieve the PersistFormat data bytes of the Recordset into a Byte array.
At the other end put this PersistFormat data back via Stream.Write and then Recordset.Open against the Stream.
You have two choices for the PersistFormat: binary ADTG and UTF-8 text XML.
hello, can you post some code example plz?