2

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?

dash
  • 89,546
  • 4
  • 51
  • 71
Baxter
  • 5,633
  • 24
  • 69
  • 105
  • I am open to other ideas of how to filter an rdlc report with a variable defined on the windows form. – Baxter Feb 24 '12 at 17:01

1 Answers1

1

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

Baxter
  • 5,633
  • 24
  • 69
  • 105