Implicit conversion to System.IO.MemoryStream

cathiec

Active member
Joined
Mar 8, 2004
Messages
28
I am using a memory stream object and i want to use the create stream method to display a dataset in the browser window. I get the error:

"Cannot implicitly convert type System.IO.Stream to System.IO.MemoryStream"

on the line:

s = SF.CreateStream(GetData());

s is the memory stream object

SF is an object of the eXport.NET class (an add on that we use to export excel documents to browser - it supports the create stream method)

GetData() is the method that returns the dataset

private DataSet GetData()
{
SqlDataAdapter da;
DataSet ds;
ds = new DataSet();
da = new SqlDataAdapter("stpDEBgetInsuranceMailMerge", strConnection);
da.SelectCommand.CommandType = CommandType.StoredProcedure;

da.Fill(ds);
return(ds);
}

i would greatly appreciate any suggestions,
 
Back
Top