Thanks, Igor, but I could not do it the same way you showed it, I've been thinking better and decided that it would be better to use a DataTable, I did the following and it's working:
string strSQL = "SELECT usuperm.idusuario, usuperm.codfunc, usuperm.perm FROM usuperm INNER JOIN usuarios ON usuarios.idusuario = usuperm.idusuario WHERE usuarios.loginusuario = @loginusuario AND usuarios.senhausuario = @senhausuario";
MySqlCommand cmdSQL = new MySqlCommand(strSQL, Conexao.Abrir());
cmdSQL.Parameters.AddWithValue("loginusuario", loginusuario);
cmdSQL.Parameters.AddWithValue("senhausuario", senhausuario);
MySqlDataReader drPerm = cmdSQL.ExecuteReader();
DataTable perm = new DataTable();
if (drPerm.HasRows == true)
{
perm.Load(drPerm);
return perm;
}
else
{
return perm;
}