public Stream RetrieveFile()
{
SqlDataReader reader = command.ExecuteReader(System.Data.CommandBehavior.SequentialAccess);
reader.Read();
return reader;
}
You cannot declare a method to say that it returns a
Stream
object, and then try to return a
SqlDataReader
from it. You need to convert the result of the SQL query into a stream, or some other object that the caller can send from the web service.