SqlBulkCopy.WriteToServer报错:“Unable to cast object of type 'System.Guid' to type 'System.String'.”
SqlBulkCopy.WriteToServer报错:“Unable to cast object of type 'System.Guid' to type 'System.String'.”踩坑日记 - 使用 SqlBulkCopy 批量插入记录报错:
System.InvalidCastException:“Unable to cast object of type 'System.Guid' to type 'System.String'.”
正确的写法:
C# Code:bulkCopy.WriteToServer(table, DataRowState.Added);
//来源:C/S框架网 | www.csframework.com | QQ:23404761
扫一扫加作者微信