why doesn't this parameterized sql return anything while the non parameterized one does?
Try changing 

sql.Parameters.AddWithValue("tb", "'" + table[2].ToString() + "'");


to 

sql.Parameters.AddWithValue("tb", table[2].ToString() );


hope this helps.