Torna al Thread

Try Using sr As New StreamReader(myFile.InputStream) Dim line As String Do line = sr.ReadLine() If Not (line Is Nothing) Then codprov = CInt(line.Substring(0, 3)) : codcom = CInt(line.Substring(3, 3)) : codalb = CInt(line.Substring(6, 4)) codcat = CInt(line.Substring(10, 2)) : dataArrivo = CDate(line.Substring(12, 10)) If line.Substring(22, 10) = "0000/00/00" Then partito = 0 Else dataPartenza = CDate(line.Substring(22, 10)) partito = 1 End If codnaz = CInt(line.Substring(32, 3)) : codprovMov = CInt(line.Substring(35, 3)) If line.Substring(38, 2) = " " Then codgruppo = 1 Else codgruppo = CInt(line.Substring(38, 2)) End If nschedina = line.Substring(40, 5) : camdisp = CInt(line.Substring(45, 5)) : camocc = CInt(line.Substring(50, 5)) REM Passaggio dati alla stored procedure Response.Write(line) End If Loop Until line Is Nothing msgbox("Operazione conclusa") -------> nn viene eseguito.....provato anche dopo end using idem stessa cosa End Using Catch ex As Exception Console.WriteLine("The file could not be read:") Console.WriteLine(ex.Message) End Try
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5