Passing sqldatareader from web service.

mike55

Contributor
Joined
Mar 26, 2004
Messages
727
Location
Ireland
Hi all

What is the most effective way of passing a sqlDataReader from a web service back to a web application? I have tried to pass it back as an object data type, but problems arise when I try to convert that object back to an sqldatareader using ctype. Any suggestions?

Mike55.
 
You can't is the simple answer. The SqlDataReader requires direct access to the SQL Server and this can't be guaranteed if you are returning it from a webmethod.

You are better simply returning the relevant data to the client from the method instead.
 
Back
Top