Developed in .Net 4.0 (vb.net).
I'm thinking of using the DataTable.Merge method to combine the two DataTable.
dataTableA.Merge(dataTableB, false, MissingSchemaAction.Error)
If so,
Cannot find definition of column XXX in target table B.
and errors.
Although this may appear to be a simple error, column XXX exists in both dataTableA and dataTableB.
dataTableA.WriteXmlSchema("schemaA.xml")
dataTableB.WriteXmlSchema("schemaB.xml")
The XML of the schema output as also matches.
The error message table name (B) and DataTable.TableName match dataTableB.
dataTableB.Columns.Contains("XXX")
returns True
.
Is there anything else you might have overlooked?
There were few similar coding areas, so I decided to use ImportRow in the loop to deal with it.
ImportRow also needs to match the schema, so I don't understand why it works...
var result=dataTableA.AsEnumerable().Union(dataTableB.AsEnumerable()) .CopyToDataTable();
Sorry, I'm not very good at Japanese.
572 Understanding How to Configure Google API Key
877 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
576 PHP ssh2_scp_send fails to send files as intended
595 GDB gets version error when attempting to debug with the Presense SDK (IDE)
601 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.