title: How to fix Update and Set command in in OLEDB, SQL?
body: <p>Using OLEDB and SQl to interact with an access database, and I need to update one column of the database however there is an error</p>
  
  <p>This is made in vb.net.
  I have made sure they are being set in the correct order based off of my database</p>
  
  <pre><code>Dim sql As String = "UPDATE UserInfo SET Password=?, CurrentLevel=?  WHERE Username=?" &amp; LoggedInUsername 'TheSQL/DDL code to update
  Dim comd As New OleDb.OleDbCommand(sql, Connstring) ' create a COMMAND for this SQL
  'set up all the parameters needed but they must be set in the same order as used in SQL
  MsgBox(Dlevel &amp; " 1 Is Working")
  
  ' comd.Parameters.AddWithValue("@Username", LoggedInUsername)
  comd.Parameters.AddWithValue("@Password", LoggedInPassword)
  comd.Parameters.AddWithValue("@CurrentLevel", Dlevel)
  
  MsgBox(Dlevel &amp; " 2 Is Working")
  
  comd.ExecuteNonQuery()    'Execute the command
  </code></pre>
  
  <p>It should update the database to change the Current Level. I have used message boxes to find where the problem is and it is when the command is being executed</p>