title: MySqlexception was unhandled, Fatal error encountered during command execution
body: <p>I try to add some values to table <code>tbllogs</code> after logging in, but I get an error</p>
  
  <p>Here's my code</p>
  
  <pre><code>if (ctr == 1)
  {
      Data.con.Open();
  
      MetroMessageBox.Show(this, "Login Success!", "Welcome!", MessageBoxButtons.OK, MessageBoxIcon.Information);
  
      MySqlDataAdapter da = new MySqlDataAdapter("Select * From dbinfo.tbluser where UserName = '" + txtUser.Text + "' and UserPassword = '" + txtPass.Text + "'", Data.con);
  
      DataTable dt = new DataTable();
      da.Fill(dt);
  
      Data.UserID = dt.Rows[0][0].ToString();
      Data.UserName = dt.Rows[0][1].ToString();
      Data.UserLevel = dt.Rows[0][3].ToString();
  
      string SaveStr = "Insert into dbinfo.tbllogs (LogsUser, LogsPassword) Values (@LogsUser, @LogsPassword)";
  
      MySqlCommand SaveCmd = new MySqlCommand(SaveStr, Data.con);
      //SaveCmd.Parameters.AddWithValue("@LogsID", Data.UserID = dt.Rows[0][0].ToString());
      SaveCmd.Parameters.AddWithValue("@LogsName", txtUser.Text);
      SaveCmd.Parameters.AddWithValue("@LogsPassword", txtPass.Text);
      //SaveCmd.Parameters.AddWithValue("@LogsLevel", Data.UserLevel = dt.Rows[0][3].ToString());
      //SaveCmd.Parameters.AddWithValue("@LogsDateIN", timelabel.Text);
  
      SaveCmd.ExecuteNonQuery();
      Data.con.Close();
  
      LoadData();
  
      Menu frmMenu = new Menu();
      frmMenu.Show();
  
      this.Hide();
  }
  </code></pre>
  
  <p>I tried changing the line</p>
  
  <pre><code>SaveCmd.Parameters.AddWithValue("@LogsName", txtUser.Text);
  </code></pre>
  
  <p>to </p>
  
  <pre><code>SaveCmd.Parameters.AddWithValue("@LogsName", Data.Password = dt.Rows[0][2].ToString()));
  </code></pre>
  
  <p>but that didn't work either.</p>
  
  <p>I will provide more code if this isn't enough, thanks in advance!</p>