That looks like VB6 code that is just ported to .NET without converting to .NET technology. There is no reason to use a ADODB.Stream object in .NET, there are better stream objects in the .NET framework. You don't even have to use a stream object in .NET to output a file, there are methods for that in the HttpResponse object. Real VB.NET code: Response.Buffer = True Response.AddHeader("content-disposition", "attachment; filename=MyFile.txt") Response.WriteFile("C:\data.txt") Response.End()
--- single minded; short sighted; long gone;