I'm using the SqlBulkCopy object to bulk insert large DataTable's into
SQL Server. Its working well except tables with IDENTITY columns in
them.
When calling SqlBulkCopy.Wri teToServer(Data Table) - I hit the
following error "The given value of type String from the data source
cannot be converted to type bigint of the specified target column."
I tried removing the IDENTITY column from the table and it went in
fine. Most unfortunate as I really need this to work on all tables,
including those with identity cols.
Does anyone have any idea how to get around this??
thanks, dave
SQL Server. Its working well except tables with IDENTITY columns in
them.
When calling SqlBulkCopy.Wri teToServer(Data Table) - I hit the
following error "The given value of type String from the data source
cannot be converted to type bigint of the specified target column."
I tried removing the IDENTITY column from the table and it went in
fine. Most unfortunate as I really need this to work on all tables,
including those with identity cols.
Does anyone have any idea how to get around this??
thanks, dave
Comment