0
When trying to fill a datatable dynamically the error occurs when performing a merge of the other data.
For Each drw In dtbTemp.Rows
dtb = obj.Enquadra(drw.Item("IDCON_TMP"), drw.Item("IDCAR_TMP"))
dtb.Columns.Add("IDCON_CON", GetType(Integer))
For Each drwTit In dtb.Rows
drwTit.Item("IDCON_CON") = drw.Item("IDCON_TMP")
Next
dtb.TableName = "Titulo"
If dst.Tables.IndexOf(dtb.TableName) > -1 Then
dst.Merge(dtb)
Else
dst.Tables.Add(dtb)
End If
dtb = New DataTable
Next
The following error is thrown:
Erro ao gerar o relatório: <Coluna> e <Coluna> têm propriedades conflitantes: propriedade DataType incompatível.
I’m taking all records from the temporary datatable and treating each row and inserting into a new datatable.