Bastyon
asked on
c# sql cmd.Parameters.AddWithValue(); for values other than '='
I am able to add values I do thing like this.
cmd.Parameters.AddWithValu e(paraname , paravalue); and by default this behavior create a sql query of '='
for example Select * from tbl where col_a = @col_a
if @col_a is 5
to put into a parameter
cmd.Parameters.AddWithValu e(@col_a, 5);
but what woud I do if I didnt want it to be '='
for example
How would I add a int parameter for > or for <>?
How would I add a parameter for LIKE in a string ?
How would I add a parameter for Is Not Null?
cmd.Parameters.AddWithValu
for example Select * from tbl where col_a = @col_a
if @col_a is 5
to put into a parameter
cmd.Parameters.AddWithValu
but what woud I do if I didnt want it to be '='
for example
How would I add a int parameter for > or for <>?
How would I add a parameter for LIKE in a string ?
How would I add a parameter for Is Not Null?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.