VB Code:
'Define the update command
Dim myCommand As New SqlClient.SqlCommand("Update myTable Set Field1 = @Field1 Where Field2 = @Field2", myConnection)
'Create the Sql Parameters
Dim prmField1 As New SqlClient.SqlParameter("@Field1, SqlDbType.Int, 4, "Field1")
Dim prmField2 As New SqlClient.SqlParameter("@Field2, SqlDbType.Int, 4, "Field2")
'Add the parameters to the command
myCommand.Parameters.Add(prmField1)
myCommand.Parameters.Add(prmField2)
'Associate the command with the data adapter
da.UpdateCommand = myCommand