J
James
Hello,
I am able to get the result set when I am giving a hardcoded value
( Ex: "WHERE LIKE 'B%' ") in a command text, but when I am trying to
give a parameter to that and passing a value, I am not able to get the
result set.
Ex: cmdObj.Text= "SELECT Phone FROM Person.Contact WHERE LastName
LIKE '@filter%' ";
SqlParameter param = new SqlParameter(");
cmdObj.Parameters.Add(param);
cmdObj.Parameters["@filer"].value= 'B';
can anyone please help me regarding this.
Thanks,
James
I am able to get the result set when I am giving a hardcoded value
( Ex: "WHERE LIKE 'B%' ") in a command text, but when I am trying to
give a parameter to that and passing a value, I am not able to get the
result set.
Ex: cmdObj.Text= "SELECT Phone FROM Person.Contact WHERE LastName
LIKE '@filter%' ";
SqlParameter param = new SqlParameter(");
cmdObj.Parameters.Add(param);
cmdObj.Parameters["@filer"].value= 'B';
can anyone please help me regarding this.
Thanks,
James