|
-
Jan 9th, 2009, 05:52 AM
#1
Thread Starter
New Member
Sending recordset over Winsock
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.
-
Jan 9th, 2009, 09:21 AM
#2
Lively Member
Re: Sending recordset over Winsock
.
(Misunderstood question)
Last edited by Daniel Elkins; Jan 9th, 2009 at 09:29 AM.
-
Jan 9th, 2009, 02:49 PM
#3
Re: Sending recordset over Winsock
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)
-
Jan 9th, 2009, 05:48 PM
#4
Re: Sending recordset over Winsock
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.
-
Oct 31st, 2012, 12:10 PM
#5
New Member
Re: Sending recordset over Winsock
hello, can you post some code example plz?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|