public object[][] query2d(string query) { //Query Data MySQLCommand mc = new MySQLCommand(query, vlcon); MySQLDataReader dr=null; try { dr = mc.ExecuteReaderEx(); } catch (FormatException f) { Console.WriteLine(f.Message + "|" + mc.Parameters.Count); return null; } finally { mc.Dispose(); } object[][] rv=new object[dr.RecordsAffected] []; try { for(uint i=0;dr.Read()&&dr.HasRows;i++) { rv[i] = new object[dr.FieldCount]; dr.GetValues(rv[i]); } } finally { dr.Close(); mc.Dispose(); } return rv; }