Количество значений запроса и полей назначения не совпадают
Public Class Admission3 Private Sub AdmissionBindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) Me.Validate() Me.AdmissionBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.ButhdatabaseDataSet) End Sub Private Sub Admission3_Load(sender As Object, e As EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'ButhdatabaseDataSet.Admission' table. You can move, or remove it, as needed. Me.AdmissionTableAdapter.Fill(Me.ButhdatabaseDataSet.Admission) End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim conn As New OleDb.OleDbConnection Dim connStr As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\Buthdatabase.accdb;Persist Security Info=False" Dim cmd As New OleDb.OleDbCommand Try conn.ConnectionString = connStr conn.Open() cmd.Connection = conn cmd.CommandText = "INSERT INTO Admission ([Patient'sName],[DateAttended],[RefferedBy],[Consultant],[Ward],[DateDischarged],[DischargedTo],[ConditionOnDischarge],[DischargeSummary]) " & _ "VALUES ([@Patient'sName],[@],[@DateAttended],[@RefferedBy],[@Consultant],[@Ward],[@DateDischarged],[@DischargedTo],[@ConditionOnDischarge],[@DischargeSummary]); " cmd.Parameters.AddWithValue("@Patient'sName", Patient_s_NameTextBox.Text) cmd.Parameters.AddWithValue("@DateAttended", Date_AttendedTextBox.Text) cmd.Parameters.AddWithValue("@RefferedBy", Reffered_ByTextBox.Text) cmd.Parameters.AddWithValue("@Consultant", ConsultantTextBox.Text) cmd.Parameters.AddWithValue("@Ward", WardTextBox.Text) cmd.Parameters.AddWithValue("@DateDischarged", Date_DischargedTextBox.Text) cmd.Parameters.AddWithValue("@DischargedTo", Discharged_ToTextBox.Text) cmd.Parameters.AddWithValue("@onditionOnDischarge", Condition_On_DischargeTextBox.Text) cmd.Parameters.AddWithValue("@DischargeSummary", Discharge_SummaryTextBox.Text) cmd.ExecuteNonQuery() conn.Close() Catch ex As Exception MessageBox.Show(ex.Message) End Try End Sub Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click AdmissionBindingSource.AddNew() End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click AdmissionBindingSource.RemoveCurrent() End Sub End Class
Что я уже пробовал:
пожалуйста, помогите мне с этой ошибкой