Results 1 to 1 of 1

Thread: dataset Updating

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2002
    Location
    Milton Keynes UK
    Posts
    27

    dataset Updating

    I have a dataset (below) and I need to go through all the rows setting one of the fields (defulat to 0). I'm trying to do a count of the rows then a for next but am not sure how to update the dataset:


    OleDbDataAdapter1.Fill(DsCurrentUserList1, "table")
    Dim objTable As DataTable
    Dim drRows As DataRowCollection
    Dim objNewRow As DataRow
    objTable = DsCurrentUserList1.Tables("table")
    drRows = objTable.Rows

    Dim iCnt As Integer
    Dim n As Integer

    iCnt = DsCurrentUserList1.Tables("table").Rows.Count

    If cmbDefaultChoice.Text = "Yes" Then
    TxtDefault.Text = 1
    'reset the other rows
    objNewRow("Default") = 0
    For n = 1 To iCnt
    'update default value to 0for each row
    Next


    Thanks Again,

    John
    Last edited by tattenhoe; Sep 20th, 2002 at 08:49 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width