Hey guys, im now trying to do a sort of selecting with multiple filters, like this for example:
Code:
sqlcecommand.commandtext="SELECT Name FROM Students WHERE ID=@ID;
sqlcecommand.parameters.addwithvalue("@ID",string[0])
sqlcecommand.parameters.addwithvalue("@ID",string[1])
sqlcecommand.parameters.addwithvalue("@ID",string[2])
sqlcecommand.parameters.addwithvalue("@ID",string[3])
and so on....
As in the example what i want is to be able to make a select and filter with more than one value on the same column so if i type id=1 and id=2 only the fields containing id1 and id2 will be shown, please note that the < or > filters wont work here because if i want for example: id=5 id =8 id =10 it will return everything between 5 and 10 rather than only returning whats with 5 whats with 8 and whats with 10, i hope i explained myself.
Is what i want possible in one commandtext?
Thanks in advance!