UniLoader error "Cannot insert explicit value for identity column"
Posted: Tue 25 Oct 2016 22:35
Hello,
Using Delphi 10.1 Update 1, UniDAC 6.4.14.
I have a table in SqlServer 2012. I want to copy data from SQLite3 database table using UniLoader.
Both tables are identical in terms of structure. SqlServer table has Identity field. SQLite3 table also has autoincrement field. These fields are named as "id" in both tables.
I am selecting all columns but not selecting id (autoincrement) column in a UniQuery from SQLite3 database table, and passing this query to UniLoader. I get error starting with "Cannot insert explicit value for identity column..."
Since I am not selecting ID column in the data to be inserted, I expect UniLoader not to try to insert anything to ID column.
Below link is a small sample project with necessary database files included to test and see for your convenience.
uniloader-identity.rar
I am not sure if this is a feature or a bug. If that is a feature, I appreciate an example showing correct usage, please.
Thanks.
Using Delphi 10.1 Update 1, UniDAC 6.4.14.
I have a table in SqlServer 2012. I want to copy data from SQLite3 database table using UniLoader.
Both tables are identical in terms of structure. SqlServer table has Identity field. SQLite3 table also has autoincrement field. These fields are named as "id" in both tables.
I am selecting all columns but not selecting id (autoincrement) column in a UniQuery from SQLite3 database table, and passing this query to UniLoader. I get error starting with "Cannot insert explicit value for identity column..."
Since I am not selecting ID column in the data to be inserted, I expect UniLoader not to try to insert anything to ID column.
Below link is a small sample project with necessary database files included to test and see for your convenience.
uniloader-identity.rar
I am not sure if this is a feature or a bug. If that is a feature, I appreciate an example showing correct usage, please.
Thanks.