dtDataAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
dtDataAdapter.AcceptChangesDuringFill = True
cmdSelect.CommandText = "select * from dbo.test"
cmdSelect.Connection = Conn
dtDataAdapter.SelectCommand = cmdSelect
cmdUpdate.CommandText = "UPDATE dbo.test" _
& "SET tt=@p2,bb=@p3 WHERE id=@p1"
cmdUpdate.Parameters.Add("@p1", SqlDbType.Int, 4, "id")
cmdUpdate.Parameters.Add("@p2", SqlDbType.Char, 10, "tt")
cmdUpdate.Parameters.Add("@p3", SqlDbType.Char, 10, "bb")
cmdUpdate.Connection = Conn
dtDataAdapter.UpdateCommand = cmdUpdate
dtDataAdapter.TableMappings.Add("Table", "Test")
dtDataAdapter.Fill(dsDataSet)
Me.DataGrid1.DataSource = dsDataSet.Tables(0)
dtDataRow = dsDataSet.Tables("test").Rows Me.DataGrid1.CurrentRowIndex)
dtDataRow.Item("tt") = "MegaBoo"
dtDataRow.Item("bb") = "Manches"
Try
dtDataAdapter.Update(dsDataSet, "Test")
Catch
MsgBox(" ____ " & Err.Description)
End Try
____ Line1: Icorrect syntax near 'tt'.
Не могу понять где ошибка, перепробовал все - Insert, Delete, Select работает а Update не хочет
Помогите ПЛЗ