title: Error `You Must Declare Scalar Variable "@...."`
body: <p>I have created a function for Execute my data </p>
  
  <pre><code>Public Function Excuter(ByVal Query As String)
      If cn.State = ConnectionState.Open Then cn.Close()
  
      cn.Open()
      Try
  
          cmd.CommandText = (Query)
          cmd.ExecuteNonQuery()
          cn.Close()
      Catch ex As Exception
  
          cn.Close()
          MsgBox(ex.ToString())
  
      End Try
  
  End Function
  </code></pre>
  
  <p>and this is my code for insert </p>
  
  <pre><code>Excuter("INSERT INTO Table_PatientDetail (Patient_ID , Patient_Name , Age,Sex , Phone_Number , Address, Check_In_ID, Check_Out_ID , Service , Transfer , Patient_Result ) VALUES (@Patient_ID , @Patient_Name , @Age, @Sex , @Phone_Number , @Address, @Check_In_ID , @Check_Out_ID , @Service , @Transfer , @Patient_Result)")
  cmd.Parameters.AddWithValue("@Patient_ID", .PatientIDPatientInformation.Text)
  cmd.Parameters.AddWithValue("@Patient_Name", .PatientNamePatientInformation.Text)
  cmd.Parameters.AddWithValue("@Age", .AgePatientInformation.Text)
  cmd.Parameters.AddWithValue("@Sex", .ComboBox1.Text)
  cmd.Parameters.AddWithValue("@Phone_Number", .PhoneNumPatientInformation.Text)
  cmd.Parameters.AddWithValue("@Address", .AddressPatientInformation.Text)
  cmd.Parameters.AddWithValue("@Check_In_ID", .CIID.Text)
  cmd.Parameters.AddWithValue("@Check_Out_ID", .COID.Text)
  cmd.Parameters.AddWithValue("@Service", .Cboservice.SelectedValue)
  cmd.Parameters.AddWithValue("@Transfer", .TransferPatientInformation.Text)
  cmd.Parameters.AddWithValue("@Patient_Result", .ComboBox3.Text)
  </code></pre>
  
  <p>When I test it, it shows this ERROR <code>Must Declare Scalar Variable"@Patient_Name"</code>; I don't understand it.</p>