Torna al Thread

PublicFunction DataRowToDataTable(ByVal arrDataRow As DataRow(), ByVal dtTarget As DataTable) As DataTable 'Controllo If (arrDataRow.Length > 0) ThenIf (arrDataRow(0).ItemArray.Length <> dtTarget.Columns.Count) Then Return dtTarget EndIf Dim drNew As DataRow = Nothing ForEach dr As DataRow In arrDataRow drNew = dtTarget.NewRow() drNew.ItemArray = dr.ItemArray dtTarget.Rows.Add(drNew) Next Return dtTarget Else ReturnNothing EndIf EndFunction
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5