(playerListTableAdapter.GetHeight(sortedPlayers[counter])
"Sorted Players" is an array of decimals, which match primary keys.
When I call the query GetHeight, I get the following error: "ConstraintException was unhandled: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints."
The SQL statement for the query is:
SELECT Height
FROM PlayerList
WHERE (Number = @PlayerID)
Note: In the database, Number is a primary key.
When we step through the execution, we can see that sortedPlayers[counter] does match a player in the database.
Any ideas on what causes this error?
Thanks!
-Dominique