title: How to add text box data to database in Visual Basic
body: <p>I'm struggling to add text from a textbox to a new database row in Visual Basic.  I am using an SQL database in a .net windows form. </p>
  
  <p>I have a binding source, and table adapter as well as the datagridview control with the database connected to the datagridview. </p>
  
  <p>I am unsure if I need to declare the database in a separate private class of its own, or if I am just not using the right order of controls in my code lines. This may be very simple to most on here however I would greatly appreciate your expertise on this question. </p>
  
  <p>Here's the code:</p>
  
  <pre><code>Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
      'TODO: This line of code loads data into the 'MRX1DataSet2._Patient_list_' table. You can move, or remove it, as needed.
      Me.Patient_list_TableAdapter.Fill(Me.MRX1DataSet2._Patient_list_)
  
    End Sub
  
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles ButtonSave.Click
      DataGridView1 = Patient_list_TableAdapter.Insert(Last_Name_:=TextBoxLastName.Text)
  
    End Sub
  
    Private Sub BindingSource1_CurrentChanged(sender As Object, e As EventArgs) Handles BindingSource1.CurrentChanged
  
    End Sub
  </code></pre>
  
  <p>p.s This is just a simple one button, one text box, one form project that I'm using as a tester for the actual program.</p>
  
  <p>Here are the errors:</p>
  
  <blockquote>
    <p>Error BC31409 sub 'Insert' must be declared 'Overloads' because
    another 'Insert' is declared 'Overloads' or 'Overrides'.</p>
    
    <p>Error BC30455 Argument not specified for parameter 'toString' of
    'Friend Sub Insert(toString As String)'.  </p>
    
    <p>Error BC30272 'Last_Name_' is not a parameter of 'Friend Sub
    Insert(toString As String)'.</p>
  </blockquote>