When i use this string as a sql command-string compiler gives me no error:
string sql = "SELECT * FROM Students WHERE StudentNo='" + T_No.Text + "'";
But, if i use this string (includes ‘%’ character) it says “Error converting data type varchar to bigint“:
string sql = "SELECT * FROM Students WHERE StudentNo='%" + T_No.Text + "%'";
What should i change in order to use ‘%’ in my statement?
Note, however, that this is inefficient.