If, Else.. what's wrong?
-
if (":PARAM2" != string.Empty) { oracleDataAdapter1.SelectCommand.Parameters[":PARAM2"].Value = txtBorgtochtNummer.Text; } else { oracleDataAdapter1.SelectCommand.Parameters[":PARAM2"].Value = "%"; } why doesn't he fill up the PARAM2 whit a "%" ?
-
if (":PARAM2" != string.Empty) { oracleDataAdapter1.SelectCommand.Parameters[":PARAM2"].Value = txtBorgtochtNummer.Text; } else { oracleDataAdapter1.SelectCommand.Parameters[":PARAM2"].Value = "%"; } why doesn't he fill up the PARAM2 whit a "%" ?
if (oracleDataAdapter1.SelectCommand.Parameters[":PARAM2"].Value != string.Empty) { oracleDataAdapter1.SelectCommand.Parameters[":PARAM2"].Value = txtBorgtochtNummer.Text; } else { oracleDataAdapter1.SelectCommand.Parameters[":PARAM2"].Value = "%"; }
Eric Dahlvang-Programmer -
if (oracleDataAdapter1.SelectCommand.Parameters[":PARAM2"].Value != string.Empty) { oracleDataAdapter1.SelectCommand.Parameters[":PARAM2"].Value = txtBorgtochtNummer.Text; } else { oracleDataAdapter1.SelectCommand.Parameters[":PARAM2"].Value = "%"; }
Eric Dahlvang-Programmerdoesn't work:( "Possible unintended reference comparison; to get a value comparison cast the left hand side to type 'string'"
-
doesn't work:( "Possible unintended reference comparison; to get a value comparison cast the left hand side to type 'string'"
-
doesn't work:( "Possible unintended reference comparison; to get a value comparison cast the left hand side to type 'string'"
if ((string)oracleDataAdapter1.SelectCommand.Parameters[":PARAM2"].Value != string.Empty) { oracleDataAdapter1.SelectCommand.Parameters[":PARAM2"].Value = txtBorgtochtNummer.Text; } else { oracleDataAdapter1.SelectCommand.Parameters[":PARAM2"].Value = "%"; }
Eric Dahlvang-Programmer -
if ((string)oracleDataAdapter1.SelectCommand.Parameters[":PARAM2"].Value != string.Empty) { oracleDataAdapter1.SelectCommand.Parameters[":PARAM2"].Value = txtBorgtochtNummer.Text; } else { oracleDataAdapter1.SelectCommand.Parameters[":PARAM2"].Value = "%"; }
Eric Dahlvang-ProgrammerYour my hero :-) Wanna be god? I have to press my button twice. I click once.. noting happens. I click twice he loads the data Then I enter other search values I click once he shows nothing I click twice he loads the date whit the new values