我想将数据表复制到数据库 这是我的代码
Public Sub PerformBulkCopy(ByVal dt As DataTable, ByVal tablename As String)
Using sqlcon As SqlConnection = New SqlConnection(PyrDLL.KoneksiLokal(Session("IP")).ConnectionString)
sqlcon.Open()
Using s As SqlBulkCopy = New SqlBulkCopy(sqlcon)
s.DestinationTableName = "" & tablename & ""
s.WriteToServer(dt)
s.Close()
End Using
sqlcon.Close()
End Using
End Sub
它清楚,但是当它在一行中有一些错误时它根本不复制,我希望它的副本行没有错误 有人可以帮帮我吗?