Click here to Skip to main content
15,911,139 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi all

In my form i have 3 combo box having the respective details:
Company Name
Company Code
Company Alias

Now while deleting i want like if the user select any one value from any of the 3 combo box , then he should be able to delete.

Please tell me how to do that

I tried using OR operator in delete query but it's not working..

SQL
delete from Company where CompanyName='" & cmbCompanyName.SelectedValue.ToString() & "' OR CompanyCode='" & cmbCompanyCode.SelectedValue.ToString() & "' OR Alias='" & cmbComapnyAlias.SelectedValue.ToString() & "' "


Thank you
Posted
Updated 2-May-13 2:52am
v2
Comments
KM Perumal 2-May-13 8:51am    
post ur query
[no name] 2-May-13 8:51am    
"it's not working", is not at all a helpful description of any kind of a problem.

1 solution

VB
"delete from Company where CompanyName='" + cmbCompanyName.Text.ToString() + "' OR CompanyCode='" + cmbCompanyCode.Text.ToString() = "' OR Alias='" + cmbComapnyAlias.Text.ToString() + "' "
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900