Torna al Thread

FileInfo fatt = new FileInfo(FFile); Attachments[0].Save(fatt); try { // Create an instance of StreamReader to read from a file. // The using statement also closes the StreamReader. using (StreamReader sr = new StreamReader(FFile)) { String line; // Read and display lines from the file until the end of // the file is reached. while ((line = sr.ReadLine()) != null) { // qui va fatto l'insert in tabella InsertDB(line, msg.Headers.From.Address, msg.Headers.ReplyTo.ToString()); } } } catch (Exception exc) { // Let the user know what went wrong. AddLogMessage("The file could not be read:"); AddLogMessage(exc.Message); }
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5