H
Huseyin altun
these two parameter field are varchar type in DB.
when I pass an empty string in one of the paramters the result set is empty.
but if I one parameter is something other than empty string, and the other
is existing value in the db, the result is correct.
Any idea ?
string SQL = "Select * from GAESTEST where MEMBERNR = :MemberNr or NAME =
:Name";
OracleCommand Cmd = new OracleCommand(SQL, OraConn);
Cmd.CommandType = CommandType.Text;
Cmd.Parameters.Add("MemberNr", txtMemberId.Text);
Cmd.Parameters.Add("Name", txtName.Text);
OraConn.Open();
when I pass an empty string in one of the paramters the result set is empty.
but if I one parameter is something other than empty string, and the other
is existing value in the db, the result is correct.
Any idea ?
string SQL = "Select * from GAESTEST where MEMBERNR = :MemberNr or NAME =
:Name";
OracleCommand Cmd = new OracleCommand(SQL, OraConn);
Cmd.CommandType = CommandType.Text;
Cmd.Parameters.Add("MemberNr", txtMemberId.Text);
Cmd.Parameters.Add("Name", txtName.Text);
OraConn.Open();