SqlBulkCopy - The given value of type String from the data source cannot be converted to type money of the specified target column

后端 未结 8 1884
慢半拍i
慢半拍i 2020-11-30 03:08

I\'m getting this exception when trying to do an SqlBulkCopy from a DataTable.

Error Message: The given value of type String from the data source cannot be c         


        
8条回答
  •  独厮守ぢ
    2020-11-30 03:15

    For the people stumbling across this question and getting a similar error message in regards to an nvarchar instead of money:

    The given value of type String from the data source cannot be converted to type nvarchar of the specified target column.

    This could be caused by a too-short column.

    For example, if your column is defined as nvarchar(20) and you have a 40 character string, you may get this error.

    Source

提交回复
热议问题