There seem to be few spots that could use some attention:
1. You declared
sql as a string but you assign the select query that you built to a variable called
sqlA, which never gets used.
2. When you create the new row and assign values to it here:
while (reader.Read())
{
row = results.NewRow();
row["apps"] = reader["apps_id"].ToString();
row["LastName"] = reader["Lname"].ToString();
results.Rows.Add(row);
intsearchresults.Items.Add(reader["Lname"].ToString());
}
the reader never took in a colomn named 'apps_id', but your select statement does select a column named 'FileLoc'.
3. In your where clause:
" where dept = '" + intdept.Text + "' and role = '" + introle.Text + "' and rating = '" + intratinglevel.Text + "' and yearsofexp = '" + intexp.Text + "' and hnd = '" + edulev.Text + "' "
the controls(TextBox?) names seem to indicate that they are integers. If this is the case, meaning the values are stored in the database as integers, then you do not want to wrap them in single quote marks.
Hope this helps.