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?
In Visual Studio 2010, I have a windows forms application frmMain.cs with a ComboBox.
Share
I am using the OleDb provider for Oracle.
The bind variable should be a question mark ? not :DEPTCODE
The bind variable :DEPTCODE would be valid for System.Data.OracleClient
See full walk through here: http://www.fullstackbusinessdesign.com/forums/ORA-01008.html
Many thanks to Prashant Kumar for this solution.
http://forums.asp.net/members/Prashant%20Kumar.aspx