1
平台:V4.0时,SQL Server 2008,Windows 2003上DataAdaptor.Fill(数据集) - 主键冲突错误
下面代码抛出SQLException在FillMethod
:
“主键冲突错误,插入表失败“。
不知道为什么在填充方法。它不是每次都发生。 Column1和Column2 - 复合键。
Dim ObjDAdapter As SqlDataAdapter
String selectstring = "select * from Table where Column1 = 'A' and Column2 = 'B'"
ObjDAdapter = New SqlDataAdapter(selectString, myConnection)
ObjDAdapter.Fill(Dataset)