title: "Error: Operator '&' is not defined for types 'String' and 'System.Windows.Forms.TextBox'."
body: <p>Im getting an error as in both <strong>SAVE</strong> and <strong>UPDATE</strong> button in <strong>.CommandText</strong> </p>
  
  <pre><code>"Error: Operator '&amp;' is not defined for types 'String' and 'System.Windows.Forms.TextBox'."
  </code></pre>
  
  <p>I don't know what is the error in both SAVE and UPDATE buttons.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>Private Sub BtnSave_Click(sender As Object, e As EventArgs) Handles BtnSave.Click
      Try
          With cm
              .Connection = cn
              .CommandText = "insert into [edit$]values('" &amp; TxtId.Text &amp; "','" &amp; TxtFamilyname.Text &amp; "','" &amp; TxtGivenname.Text &amp; "','" &amp; TxtGender.Text &amp; "','" &amp; TxtDob.Text &amp; "','" &amp; TxtExamdate.Text &amp; "','" &amp; TxtExamtime.Text &amp; "','" &amp; TxtStreet.Text &amp; "','" &amp; TxtHouse.Text &amp; "','" &amp; TxtPlz.Text &amp; "','" &amp; TxtCity &amp; "' )"
              .ExecuteNonQueryAsync()
          End With
          FillDataGridView("select * from [edit$]")
      Catch ex As Exception
          MsgBox(ex.Message, MsgBoxStyle.Critical, Text)
          Return
      End Try
      MsgBox("succefully Saved!", MsgBoxStyle.Information, Text)
  End Sub
  
  Private Sub BtnUpdate_Click(sender As Object, e As EventArgs) Handles Btnupdate.Click
      Try
          With cm
              .Connection = cn
              .CommandText = "Update [edit$] set [Family Name] = '" &amp; TxtFamilyname.Text &amp; "' where id ='" &amp; TxtId.Text &amp; "' and Given Name = '" &amp; TxtGivenname.Text &amp; "'and Gender = '" &amp; TxtGender.Text &amp; "'and DOB = '" &amp; TxtDob.Text &amp; "'and Exam Date'" &amp; TxtExamdate.Text &amp; "'and Exam Time = '" &amp; TxtExamtime.Text &amp; "'and Street Name = '" &amp; TxtStreet.Text &amp; "'and House Nr = '" &amp; TxtHouse.Text &amp; "'and PLZ = '" &amp; TxtPlz.Text &amp; "'and CITY = '" &amp; TxtCity &amp; "'"
              .ExecuteNonQuery()
          End With
          FillDataGridView("select * from [edit$]")
      Catch ex As Exception
          MsgBox(ex.Message, MsgBoxStyle.Information, Text)
          Return
      End Try
      MsgBox("Succesfully updated!", MsgBoxStyle.Information, Text)
  End Sub
  </code></pre>