Hi everyone,
[note: I have also posted this in the Window Forms section]
I have a VB WindowsForms app using SQLServer as my db, and strongly-typed datasets. On my Main Form I have a DataGRidView, that is populated via the TableAdapter with the Fill method.
What I have also is different 5 T-SQL select statements (FillBy...), and another windows form where users can choose only 1 of 5 Filter options at a time (radioButtons) to dynamically change the content of the Grid.
What I instead want to do is somehow have One generic T-SQL command to handle if the user wants to display data in the grid by a combination of different filter options...so essentially changing the radioButtons to checkboxes. I have read an article on codeProject (http://www.codeproject.com/vb/net/TableAdapter.asp) that confused me a bit, but in any case, if I were passing in strings as parameters it would be easy to constuct a dynamic SQL statement for that, but I also have 1 boolean, 2 dates and 2 strings as possible parameter values .
Please could some kind soul help me out?
Much thanx!
Shalan99
[note: I have also posted this in the Window Forms section]
I have a VB WindowsForms app using SQLServer as my db, and strongly-typed datasets. On my Main Form I have a DataGRidView, that is populated via the TableAdapter with the Fill method.
What I have also is different 5 T-SQL select statements (FillBy...), and another windows form where users can choose only 1 of 5 Filter options at a time (radioButtons) to dynamically change the content of the Grid.
What I instead want to do is somehow have One generic T-SQL command to handle if the user wants to display data in the grid by a combination of different filter options...so essentially changing the radioButtons to checkboxes. I have read an article on codeProject (http://www.codeproject.com/vb/net/TableAdapter.asp) that confused me a bit, but in any case, if I were passing in strings as parameters it would be easy to constuct a dynamic SQL statement for that, but I also have 1 boolean, 2 dates and 2 strings as possible parameter values .
Please could some kind soul help me out?
Much thanx!
Shalan99