G
Guest
I have a VB Windows form that calls the DataAdapter.Update method, passing a
DataTable of one row with RowState = 'Added'. This is the stripped-down code:
Try
Dim Count As Integer = MySqlAdapter.Update(MyDataTable.GetChanges)
Catch ex As System.Data.SqlClient.SqlException
MessageBox.Show("Update failed: " & ex.Message)
End Try
The underlying table, in SQL Server 2000, has a unique constraint defined on
a non-PK data column. When that column has a DataTable value which violates
the constraint, the DB refuses to add the row, Update returns zero for a
rowcount, but there is no exception thrown.
Why not?
Client: Windows XP SP1, Visual Studio 2003 version 7.1.3088, .NET Framework
1.1 version 1.1.4322 SP1, MDAC 2.8 RTM
Server: Windows NT 5.0 (Build 2195: Service Pack 2), SQL Server 2000 version
8.00.760
DataTable of one row with RowState = 'Added'. This is the stripped-down code:
Try
Dim Count As Integer = MySqlAdapter.Update(MyDataTable.GetChanges)
Catch ex As System.Data.SqlClient.SqlException
MessageBox.Show("Update failed: " & ex.Message)
End Try
The underlying table, in SQL Server 2000, has a unique constraint defined on
a non-PK data column. When that column has a DataTable value which violates
the constraint, the DB refuses to add the row, Update returns zero for a
rowcount, but there is no exception thrown.
Why not?
Client: Windows XP SP1, Visual Studio 2003 version 7.1.3088, .NET Framework
1.1 version 1.1.4322 SP1, MDAC 2.8 RTM
Server: Windows NT 5.0 (Build 2195: Service Pack 2), SQL Server 2000 version
8.00.760