Here is a solution (lets use DataTable instead of DataSet)
1. Let dt1 have xml data
Create dt2 from DB
Dim Da As New SqlDataAdapter("select userid,loginid from compalint", conn)
Dim cmdbld As New SqlCommandBuilder(Da)
Dim dt2 As DataTable = New DataTable
Da.Fill(dt2)
3. Now you need to go through each row in dt1 and update dt2. Once you have finished updating dt2 call the udpate command..
Dim foundRows As DataRow()
For Each dRow As DataRow In dt1.Rows
foundRows = dt2.Select("userid = '" & dRow("UserId") & "'")
For Each dFoundRow As DataRow In foundRows
dFoundRow("LoginId") = dRow("LoginId")
Next
Next
dt2.AcceptChanges()
cmdbld.GetUpdateCommand()
Da.Update(dt2, "table")