G
gottfried.lesigang
Dear everybody!
VS 2003, .Net 1.1
I've got a hierarchical DataStructure: MainGroup, SubGroup, Detail
On my form there is a combo to select the maingroup, dynamically a
second combo shows the fitting subgroups. Selecting one of them a grid
shows the fitting details... That works fine.
Now I want to choose all detailrows fitting to a chosen _main_group.
In this case the subgroup-combo is null.
That's my filter (ID-Types: Guid):
string filter=String.Format("DetailID IN (SELECT db1.DetailID FROM
Details AS db1 WHERE db1.SubGroupID IN(SELECT db2.SubGroupID FROM
SubGroups AS db2 WHERE
db2.MainGroupID='{0}'))",this.cboMainGroup.Value ); //in one long
line ;-)
I put a stop at this line, took the filter's content into a query
within SQL-Server. It workes perfectly?!?!
But on runtime a get an error when using the filter in
DefaultView.RowFilter ("missing operand after db1.")
Any ideas?
TIA
Gottfried
VS 2003, .Net 1.1
I've got a hierarchical DataStructure: MainGroup, SubGroup, Detail
On my form there is a combo to select the maingroup, dynamically a
second combo shows the fitting subgroups. Selecting one of them a grid
shows the fitting details... That works fine.
Now I want to choose all detailrows fitting to a chosen _main_group.
In this case the subgroup-combo is null.
That's my filter (ID-Types: Guid):
string filter=String.Format("DetailID IN (SELECT db1.DetailID FROM
Details AS db1 WHERE db1.SubGroupID IN(SELECT db2.SubGroupID FROM
SubGroups AS db2 WHERE
db2.MainGroupID='{0}'))",this.cboMainGroup.Value ); //in one long
line ;-)
I put a stop at this line, took the filter's content into a query
within SQL-Server. It workes perfectly?!?!
But on runtime a get an error when using the filter in
DefaultView.RowFilter ("missing operand after db1.")
Any ideas?
TIA
Gottfried