VB.Net 2005
Inspect a dataset for changed records…
Private Sub cmdUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdUpdate.Click
Dim Conn As New SqlClient.SqlConnection
Conn.ConnectionString = "Server=maxsql003.maximumasp.com; Database=V014U07NUI; user id=V014U07NUI; password=nUPVchgPSKnw;"
Dim oRow As DataRow
Dim oTable As DataTable
oTable = ds.Tables(0).GetChanges(DataRowState.Modified)
If oTable Is Nothing Then
MsgBox("No Reocrds To Process")
Exit Sub
End If
For Each oRow In oTable.Rows
Dim sqlparams(0) As SqlClient.SqlParameter
sqlparams(0) = New SqlClient.SqlParameter("@Id_Score_File", oRow.Item("Id_Score_File"))
Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(Conn, CommandType.StoredProcedure, "spExam_CMTO_Update", sqlparams)
Next
MsgBox("Done")
End Sub