Mysql and Unity : reader problem

Hello everyone.

I'm trying to SELECT some values in my DB but Unity tells me my reader is closed ... Do you know how to fix that ?

Thanks for your help :)

Here my select function :

```

MySqlDataReader GetValueFromTable(string table, ArrayList attribut, ArrayList parameter)
{
string query = string.Empty;
MySqlDataReader rdr = null;

`  try
  {
        query = "SELECT * FROM " + table + " WHERE ";
        for (int i = 0; i < attribut.Count; i++)
        {
            query += attribut *as string;*
 *query += " = ";*
 _query += parameter *as string;*_
 _*if(i != attribut.Count - 1) query += " AND ";*_
 _*}*_
 _*query += ";";*_
 _*if (con.State != ConnectionState.Open)*_
 _*con.Open();*_
 _*using (con)*_
 _*{*_
 _*using (cmd = new MySqlCommand(query, con))*_
 _*{*_ 
 _*rdr = cmd.ExecuteReader();*_
 _*}*_ 
 _*}*_
 _*}*_
 _*catch (Exception ex)*_
 _*{*_
 _*Debug.Log(ex.ToString());*_
 _*}*_
 _*finally {}*_
 _*return rdr;*_
_*```*_
_*

}

*_ _

/* ---------- And now How I'm using it --------- /_ _/ --------------------------------------------- */

_
_*

ArrayList attribut = new ArrayList();*_ _*attribut.Add("id");

*_ _* ArrayList parameter = new ArrayList();*_ _*parameter.Add("1");*_ _*MySqlDataReader reader = GetValueFromTable("user",attribut,parameter);*_ _*while (reader.Read())*_ _*{*_ _*Debug.Log(reader[0]+" "+reader[6]);*_ _*}*_ _*reader.Close();*_ _*`
*_

Although I've never used that class, the examples here http://msdn.microsoft.com/en-us/library/haa3afyz(v=vs.71).aspx do the '.Open' after the 'new SqlCommand' Perhaps that order is important?