I come across a very silly issue. I have a searchbox in which user can enter both numeric and string. Some of Where clauses are integer while others are string. My query is something like:
string keyword = "";
string query = "Select * from Table
where POrderNumber = {0}
AND
Fname LIKE '% {0}%'";
query = string.Format(query,keyword);
I am getting Data Conversion Error
PONumberis integer that's why I am getting error. My question is how to cater both?inttype field? I typedJhon