title: Retireve a query as a byte array
body: <p>Im trying to retrieve a query as a byte array. Im stuck @ the code though.</p>
  
  <pre><code>byte[] temp = QueryFile("SELECT modelFile FROM items WHERE modelName='F_Pants1'");
      public byte[] QueryFile(string queue)
              {
                  MySqlCommand command = MySqlCon.CreateCommand();
                  MySqlDataReader Reader;
                  command.CommandText = queue;
                  MySqlCon.Open();
                  Reader = command.ExecuteReader();
                  byte[] thisrow = new byte[1000];
                  while (Reader.Read())
                  {
                      for (int i = 0; i &lt; Reader.FieldCount; i++)
                          thisrow[0] = Convert.ToByte(Reader.GetValue(i).ToString());
  
  
                  }
                  thisrow = thisrow.Remove(thisrow.Length - 1, 1);
                  MySqlCon.Close();
  
                  return thisrow;
  
              }
  </code></pre>
  
  <p>If anyone has an answer, i would greatly appreciate it.</p>