title: Uploading a byte array to MYSQL
body: <p>I have a file I converted into one long string. I want to take that string, convert it to a array of bytes then upload it to my database. However, when i run my code, it shows up in the database as NULL;</p>
  
  <p>Here's my code:</p>
  
  <pre><code>SQL.UploadFile(Encoding.ASCII.GetBytes(FBX), txt_Name.Text);
  
          public void UploadFile(byte[] value, string Where)
      {
  
          const string SQL = "UPDATE itemmodel SET modelFile='@File' WHERE modelName='@Name'";
          MySqlCommand cmd = new MySqlCommand(SQL, MySqlCon);
          cmd.Parameters.AddWithValue("@File", value);
          cmd.Parameters.AddWithValue("@Name", Where);
          MySqlCon.Open();
          cmd.ExecuteNonQuery();
          MySqlCon.Close();
  
      }
  </code></pre>