Environment:
Visual Studio 2010 (.NET FrameWork 4)
ASP.NET web Application
Oracle Database
using System.Data.OracleClient
I have a web form where a user can enter any or no data into text boxes corresponding to each parameter in my query.if user entered no data the text box will get "0" value.
here is my query:
SELECT "CardNo" , "Name"
FROM CSC.CommercialCardList
WHERE("CardNo"=:CardNo or :CardNo=0) and ("Name"=:Name or :Name=0)
when I right click on the query from the tableadaptor in the MYDATABASE.xsd panel, and select 'Preview Data' and fill parameter values with "0" i get the error (" ORA-01008 : Not all variables bound" )
can anyone help me?
--EDIT--
CardNo = (CardNoTextBox.Text != String.Empty) ? CardNoTextBox.Text : "0";
Name = (NameTextBox.Text != String.Empty) ? NameTextBox.Text : "0";
CommercialCardList.Fill(dt, CardNo,Name);
ds.Tables.Add(dt);