SqlDataAdapter.Fill(DataSet)
.NET (Core and Framework)
1
Posts
1
Posters
0
Views
1
Watching
-
I'm going to bind data set to combo boxes. Data set is compound from 2 tables and joined by relation. The declaration is as follows:
Private tablePRAgent As PRAgentDataTable Private tablePRAgentLocation As PRAgentLocationDataTable Private relationPRAgentPRAgentLocation As DataRelation
The tablePRAgentDataTable
has main rows with details in tablePRAgentLocationDataTable
. So first combo is bound toPRAgentDataTable
and second - toPRAgentLocationDataTable
, by relation. Filling adapters (and in consequence combos) while I add clause "WHERE col=@parameter" ends with "exception of type 'System.Data.ConstraintException'". When there is no WHERE clause everything goes right. How could I overcome this problem?