Pass variable between windows form and DataSet TableAdapter SQL where clause
In Visual Studio 2010, I have a windows forms application frmMain.cs with a ComboBox. From the form itself I can access its value with cmbxYear.SelectedValue. I also have a DataSet.xsd file to bind to an rdlc report to a TableAdapter to present view data. The TableAdapter has a SelectCommand that takes SQL code. I need to get the value of cmbxYear.SelectedValue into the WHERE clause of the TableAdapter.
Does anyone know how I can access/pass the variable value from the form into the DataSet TableAdapter SelectCommand WHERE clause?
(I am open to other ideas of how to filter an rdlc report with a variable defined on the windows form.)
Last edited by karlhungus; 02-24-2012 at 05:04 PM..