Tuesday, April 18, 2017

getting error Failed to enable constraints. One or more rows contain values violating non-null unique, or foreign-key constraints

Leave a Comment

i am getting error pls help i am new to asp.net

Public Shared Function GetPOListForWO(ByVal p_UserContactID As Integer, ByVal p_WONumber As Integer) As dsPOList             Dim ds As New dsPOList             Using ta As New dsPOListTableAdapters.wsm_View_PurchaseOrderListTableAdapter                 Try                     ta.FillByWONumber(ds.wsm_View_PurchaseOrderList, p_UserContactID, p_WONumber)                 Catch ex As Exception                 End Try             End Using             Return ds         End Function 

1 Answers

Answers 1

what i did i open command window and put

? ds.wsm_View_PurchaseOrderList.GetErrors(0).RowError  

It will tell u the col. Which causing the error and then check the xsd and right click on col and check constrain or len. Of the col.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment