Click here to Skip to main content
15,902,032 members

Comments by Integra Belm (Top 5 by date)

Integra Belm 29-Jul-16 5:05am View    
ok now it get the required results when the comboBox is set to "Female" but when it set to "Male" it get both female and male results.
Integra Belm 29-Jul-16 4:47am View    
ok i'm going to try that , thanx in advance :D.
Integra Belm 29-Jul-16 4:18am View    
I enter the word "Smith" in the textbox and i select "Female" from the comboBox.
Integra Belm 29-Jul-16 4:11am View    
private void GETRSLT(string Nme, string Gndr, TextBox nme, ComboBox gndr)
{
DataView dvtble = tb1.DefaultView;
dvtble.RowFilter = Nme + "Like '%" + nme.Text + "%'" + " AND " + Gndr + "Like '%" + gndr.SelectedItem + "%'";
}

private void button1_Click(object sender, EventArgs e)
{

GETRSLT("Last_Name", "Gender", textBox1, comboBox1);
}
Integra Belm 29-Jul-16 3:57am View    
thanx for the link it really useful for increasing my knowledge , as for the code now it gives me An unhandled exception of type 'System.Data.SyntaxErrorException' occurred in System.Data.dll

Additional information: Syntax error: Missing operand after ''%Smith%'' operator.