title: How do I update a specific row in access using SQL update? In my current code I keep getting the error data type mismatch
body: <p>In my current code, I keep getting the error data type mismatch most of it worked before I added the SQL where statement to select a specific id</p>
  
  <pre><code> Private Sub UpdateButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UpdateButton.Click
      'tells your program the data source
      provider = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" 'refrences to the provider
      datafile = "C:\Users\Abdulaleem\Documents\Books.accdb" 'refers to the location of the file
      connectstring = provider &amp; datafile ' combines the 2 variables
      myconnect.ConnectionString = connectstring ' this class allows you to connect to the database
      myconnect.Open() ' opens the databse
      Dim sqlupdate As String
      sqlupdate = "Update BooksTbl  set BookName='" &amp; TitleTEXT.Text &amp; "' , [BookAuthor]='" &amp; AuthorTEXT.Text &amp; "',[Genre] ='" &amp; GenreTEXT.Text &amp; "',[IsAvailable] = " &amp; status &amp; ",[DatePublished] = '" &amp; DateTimeCHANGER.Text &amp; "' , [PictureLocation] = '" &amp; PiclocTEXT.Text &amp; "' WHERE [ID] = '" &amp; idshower.Text &amp; "'"
      Dim cmd As OleDbCommand = New OleDbCommand(sqlupdate, myconnect) 'creating new database object 
      Try
          cmd.ExecuteNonQuery() ' executes our sql query
          cmd.Dispose() 'deleting from ram to stop interferences
          myconnect.Close() 'closes database and connection
          TitleTEXT.Clear()
          AuthorTEXT.Clear()
          GenreTEXT.Clear()
      Catch ex As Exception ' if the programs crashes then it will be caught here and put into the ex variable
          MsgBox(ex.Message) ' shows what error occured
          myconnect.Close()
      End Try
      myconnect.Close()
  </code></pre>