30-11-21 09:31 AM
Answered! Go to Answer.
30-11-21 11:39 AM
For Each column As System.Data.DataColumn In Input_Collection.Columns
If Field_Name.Equals(column.ColumnName) Then
If CStr(Field_Type).ToUpper.Equals("TEXT") Then
Output_Collection.Columns.Add(column.ColumnName,GetType(String))
ElseIf CStr(Field_Type).ToUpper.Equals("NUMBER") Then
Output_Collection.Columns.Add(column.ColumnName,GetType(Integer))
ElseIf CStr(Field_Type).ToUpper.Equals("FLAG") Then
Output_Collection.Columns.Add(column.ColumnName,GetType(Boolean))
ElseIf CStr(Field_Type).ToUpper.Equals("DATE") Then
Output_Collection.Columns.Add(column.ColumnName,GetType(Date))
Else
Throw New Exception("Invalid File Type Provided")
End If
Else
Output_Collection.Columns.Add(column.ColumnName,column.DataType)
End If
Next
For Each row as System.Data.DataRow In Input_Collection.Rows
Output_Collection.ImportRow(row)
Next
30-11-21 10:08 AM
30-11-21 10:15 AM
30-11-21 11:39 AM
For Each column As System.Data.DataColumn In Input_Collection.Columns
If Field_Name.Equals(column.ColumnName) Then
If CStr(Field_Type).ToUpper.Equals("TEXT") Then
Output_Collection.Columns.Add(column.ColumnName,GetType(String))
ElseIf CStr(Field_Type).ToUpper.Equals("NUMBER") Then
Output_Collection.Columns.Add(column.ColumnName,GetType(Integer))
ElseIf CStr(Field_Type).ToUpper.Equals("FLAG") Then
Output_Collection.Columns.Add(column.ColumnName,GetType(Boolean))
ElseIf CStr(Field_Type).ToUpper.Equals("DATE") Then
Output_Collection.Columns.Add(column.ColumnName,GetType(Date))
Else
Throw New Exception("Invalid File Type Provided")
End If
Else
Output_Collection.Columns.Add(column.ColumnName,column.DataType)
End If
Next
For Each row as System.Data.DataRow In Input_Collection.Rows
Output_Collection.ImportRow(row)
Next
30-11-21 11:54 AM
30-11-21 12:25 PM
30-11-21 12:36 PM
30-11-21 12:54 PM
30-11-21 01:45 PM
07-12-21 05:12 PM