B
Blue man
Hello
I think this should work , but return an error " error near ' ) " what is
wrong with this query?
I want to creat the query from 2 TextBox , save the strings into variables
and combine to make the final string command .
string namebx = Name_tbx.Text.ToString();
string personalnum=Pn_Tbx.Text.ToString();
string command="SELECT PN, FirstName, SurName, Gener FROM PersonalInfo WHERE
(FirstName =' "+namebx+" ')" + "OR (PN ="+ personalnum +" )" ;
when i try to send this command az a query the error appear! that's strange
cuz it works with one field but not with 2.
could you please tell me where is (or what is) my mistake?
thanks in advance
I think this should work , but return an error " error near ' ) " what is
wrong with this query?
I want to creat the query from 2 TextBox , save the strings into variables
and combine to make the final string command .
string namebx = Name_tbx.Text.ToString();
string personalnum=Pn_Tbx.Text.ToString();
string command="SELECT PN, FirstName, SurName, Gener FROM PersonalInfo WHERE
(FirstName =' "+namebx+" ')" + "OR (PN ="+ personalnum +" )" ;
when i try to send this command az a query the error appear! that's strange
cuz it works with one field but not with 2.
could you please tell me where is (or what is) my mistake?
thanks in advance