Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO & WinSock

Status
Not open for further replies.

TRYP

Programmer
Jun 20, 2000
136
US
How can i pass a recordset to a client using winsock ??
 
TRYP - Don't get frustrated so easily -- sometimes it takes a while before someone notices your message.


But, to answer your question, you can't (obviously) pass the recordset over a winsock connection because a recordset is an object. You must first serialize the recordset into a string. Best way to do this is convert it to XML using ado's save method with the adPersistXML flag on it.

MyRS.Save "OutputFile.XML, adPersistXML

You then send it over your winsock connection, saving it as a temp file on the other end. To get it back into a recordset, open the file like this:

rs.Open "c:\winnt\temp\MyFile.XML",,,,adCmdFile


Hope this helps.
Chip H.

 
Chip
your post was the most helpful thing i found on the web in at least a week and a half.

thanks

any insight into RDS or RDO msdn is not all that loose with their knowledge there.

tryp
 
Sorry, I skipped from ODBC straight to ADO, so I've never used those technologies. Seeing as how .NET will be based on ADO, I'd advise you to start learning it.

Chip H.
 
ADO i know
its getting it to work from remote computer to remote computer without a lan is what i wanna know
;)
tryp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top