cathiec Posted June 23, 2004 Posted June 23, 2004 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, Quote
pelikan Posted June 23, 2004 Posted June 23, 2004 you have to cast the Stream to a MemoryStream does this work: s = (MemoryStream) SF.CreateStream(GetData()); ? Quote IN PARVUM MULTUM
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.