Guessing that
qid
is your parameter, you need to replace:
SqlCommand cmd = new SqlCommand("SELECT [name], [family], [path] from [tbl_t] WHERE id= + qid");
with
SqlCommand cmd = new SqlCommand("SELECT [name], [family], [path] from [tbl_t] WHERE id= "+ qid);
or
SqlCommand cmd = new SqlCommand("SELECT [name], [family], [path] from [tbl_t] WHERE id= '+ qid+"'");
depending on value of
qid
Pay attention to the quote at the end.
The way you build the query is dangerous and open door to SQL injection.
SQL Injection[
^]
SQL injection - Wikipedia[
^]