BatchMove exception: column specified more than once
Posted: Fri 13 Apr 2018 18:26
I'm using the CRBatchMove components to transfer all data from a local embedded database to MS SQL Server and it's working well for most of my tables. However, on two of them, I'm getting a strange error and I can't see anything particular about the data or tables in these instances.
Here's the error message that appears: "The column name XXX is specified more than once in the SET clause or column list of an INSERT."
In one case, it's a small table and the column is a VARCHAR(200) with most values NULLs and the rest containing a URL (the error happens the first time a non-NULL value appears). In the other case, a DateTime field raises three instances of this error all at once.
Since I'm converting all data over, the tables are empty before I start and the data structures are simple with no triggers or foreign key relationships. I've checked the source datasets there is only one instance of the named fields in each case. I've specified mmFieldName as the FieldMappingMode and listed all the fields in the Mappings list of the BatchMove component. The destination is a TUniTable using the SQLServer Provider.
This project is in Delphi XE and is using UniDAC 7.2.7.
Any thoughts on how I can get past this?
Here's the error message that appears: "The column name XXX is specified more than once in the SET clause or column list of an INSERT."
In one case, it's a small table and the column is a VARCHAR(200) with most values NULLs and the rest containing a URL (the error happens the first time a non-NULL value appears). In the other case, a DateTime field raises three instances of this error all at once.
Since I'm converting all data over, the tables are empty before I start and the data structures are simple with no triggers or foreign key relationships. I've checked the source datasets there is only one instance of the named fields in each case. I've specified mmFieldName as the FieldMappingMode and listed all the fields in the Mappings list of the BatchMove component. The destination is a TUniTable using the SQLServer Provider.
This project is in Delphi XE and is using UniDAC 7.2.7.
Any thoughts on how I can get past this?