C dataadapter update not updating database

Fill(category Table) Dim category Row As Data Row = category Table.

I couldn't create an update statement to update the database when I pulled the information by a join query, So I pulled down both tables into a dataset with an XML Schema description where the two are related by the itm_id key as in the database. For more information, see Merging Data Set Contents and Handling Data Adapter Events. The following examples demonstrate how to perform updates to modified rows by explicitly setting the Private Sub Adapter Update(By Val connection String As String) Using connection As Sql Connection = New Sql Connection( _ connection String) Dim adapter As Sql Data Adapter = New Sql Data Adapter( _ "SELECT Category ID, Category Name FROM dbo. Update Command = New Sql Command( _ "UPDATE Categories SET Category Name = @Category Name " & _ "WHERE Category ID = @Category ID", connection) adapter. i have two questions: 1) What am I missing that is causing the script not to work?2) With respect to a dataset how can I get at the value of a specific Row/Column? Ron Sql Connection cn Production SQL = new Sql Connection("Data Source=SQLSVR01; Integrated Security=SSPI; Initial Catalog=Master"); cn Production SQL.The Update method of the Data Adapter is called to resolve changes from a Data Set back to the data source.

179

Leave a Reply