I am having some problems:
vb Code:
Using connection As New OleDbConnection(myConnectionString) Using adapter As New OleDbDataAdapter("SELECT NameFirst, NameLast FROM Employees", _ connection) Dim insert As New OleDbCommand("INSERT INTO Employees (NameFirst, NameLast) VALUES (@NameFirst, @NameLast)", _ connection) adapter.InsertCommand = insert adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey Dim table As New DataTable adapter.FillSchema(table, SchemaType.Source) Dim row As DataRow = table.NewRow() row("NameFirst") = aName(0) row("NameLast") = aName(1) table.Rows.Add(row) adapter.Update(table) End Using End Using
I am getting an error with this line:
adapter.Update(table)
error:
No value given for one or more required parameters.




Reply With Quote