Reputation: 14953
i have dataset
in my C# program and i try to run query
DataRow[] drTitles = dsConf.Tables[1].Select("Distinct SNum");
but i got error
Syntax error: Missing operand after 'SNum' operator
Upvotes: 0
Views: 456
Reputation: 4683
Select is for filtering use to table in data view to get distinct row Use this syntax
System.Data.DataView dv = new System.Data.DataView(dsConf.Tables[1]);
System.Data.DataTable dt = dv.ToTable(true,"SNum");
Upvotes: 2