Public Function MergeTables(ByRef Table1 As DataTable, ByRef Table2 As DataTable, ByVal strSortExpression As String) As DataTable Dim View As DataView Dim Table As DataTable = Table1 Dim intCount As Integer Try If Table2.Rows.Count > 0 Then Table.BeginLoadData()
For intCount = 0 To Table2.Rows.Count - 1 Table.LoadDataRow(Table2.Rows(intCount).ItemArray, True) Next Table.EndLoadData() If strSortExpression <> "" Then View = New DataView(Table) View.Sort = strSortExpression Table = View.ToTable() End If End If Catch
ex As Exception Table = Nothing PrintLogMessage("CATCH in Common.MergeTables()") PrintLogMessage(ex.Message) If Not ex.InnerException Is Nothing Then PrintLogMessage(ex.InnerException.Message) End If End Try Return Table End Function
Public Function MergeTables(ByRef Table1 As DataTable, ByRef Table2 As DataTable, ByVal strSortExpression As String) As DataTable Dim View As DataView Dim Table As DataTable = Table1 Dim intCount As Integer Try If Table2.Rows.Count > 0 Then Table.BeginLoadData()
For intCount = 0 To Table2.Rows.Count - 1 Table.LoadDataRow(Table2.Rows(intCount).ItemArray, True) Next Table.EndLoadData() If strSortExpression <> "" Then View = New DataView(Table) View.Sort = strSortExpression Table = View.ToTable() End If End If Catch
ex As Exception Table = Nothing PrintLogMessage("CATCH in Common.MergeTables()") PrintLogMessage(ex.Message) If Not ex.InnerException Is Nothing Then PrintLogMessage(ex.InnerException.Message) End If End Try Return Table End Function
Public Function MergeTables(ByRef Table1 As DataTable, ByRef Table2 As DataTable, ByVal strSortExpression As String) As DataTable
Dim View As DataView
Dim Table As DataTable = Table1
Dim intCount As Integer
Try
If Table2.Rows.Count > 0 Then
Table.BeginLoadData()
For intCount = 0 To Table2.Rows.Count - 1
Table.LoadDataRow(Table2.Rows(intCount).ItemArray, True)
Next
Table.EndLoadData()
If strSortExpression <> "" Then
View = New DataView(Table)
View.Sort = strSortExpression
Table = View.ToTable()
End If
End If
Catch ex As Exception
Table = Nothing
PrintLogMessage("CATCH in Common.MergeTables()")
PrintLogMessage(ex.Message)
If Not ex.InnerException Is Nothing Then
PrintLogMessage(ex.InnerException.Message)
End If
End Try
Return Table
End Function
JoshStodola
Star
13736 Points
3177 Posts
NNTP is pretty much worthless
May 21, 2007 02:22 PM|LINK
JoshStodola
Star
13736 Points
3177 Posts
Re: NNTP is pretty much worthless
May 21, 2007 02:23 PM|LINK
JoshStodola
Star
13736 Points
3177 Posts
Re: NNTP is pretty much worthless
May 21, 2007 02:24 PM|LINK
JoshStodola
Star
13736 Points
3177 Posts
Re: NNTP is pretty much worthless
May 21, 2007 02:24 PM|LINK
JoshStodola
Star
13736 Points
3177 Posts
Re: NNTP is pretty much worthless
May 21, 2007 02:25 PM|LINK
JoshStodola
Star
13736 Points
3177 Posts
Re: NNTP is pretty much worthless
May 21, 2007 02:26 PM|LINK
JoshStodola
Star
13736 Points
3177 Posts
Re: NNTP is pretty much worthless
May 21, 2007 02:27 PM|LINK
JoshStodola
Star
13736 Points
3177 Posts
Re: NNTP is pretty much worthless
May 21, 2007 02:31 PM|LINK
Public Function MergeTables(ByRef Table1 As DataTable, ByRef Table2 As DataTable, ByVal strSortExpression As String) As DataTable Dim View As DataView Dim Table As DataTable = Table1 Dim intCount As Integer Try If Table2.Rows.Count > 0 Then Table.BeginLoadData() For intCount = 0 To Table2.Rows.Count - 1 Table.LoadDataRow(Table2.Rows(intCount).ItemArray, True) Next Table.EndLoadData() If strSortExpression <> "" Then View = New DataView(Table) View.Sort = strSortExpression Table = View.ToTable() End If End If Catch ex As Exception Table = Nothing PrintLogMessage("CATCH in Common.MergeTables()") PrintLogMessage(ex.Message) If Not ex.InnerException Is Nothing Then PrintLogMessage(ex.InnerException.Message) End If End Try Return Table End Functionvcsjones
All-Star
34842 Points
4424 Posts
Moderator
MVP
Re: NNTP is pretty much worthless
May 21, 2007 09:40 PM|LINK
You are not getting points because you are replying to your own post. Points are not awarded if you reply to a thread that you have started.