Results 1 to 7 of 7

Thread: Navigate Through Table !!

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2002
    Location
    Mumbai
    Posts
    31

    Navigate Through Table !!

    I have connected to the access database that is ok and also i am getting the value of the first field.
    Now I want to navigate through the records moveFirst,MoveLast,MovePrevious and Movenext in VB.Net

    code in vb.net
    <!--
    adAdapter = New OleDbDataAdapter(strSQL, cnConnection)
    adAdapter.Fill(dataset1,"AUTHOR")
    console.writeline dataset1.Tables(0).Rows(0).Item(0)
    -->

    Need guidance ... help !!!

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    Re: Navigate Through Table !!

    This was in ADO (VB6) days , sadly it's been removed from ADO.NET . I'll try to do a sample though .

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    I've just built a simple demo that shows you how this can be done in ADO.NET .
    Enjoy !
    Attached Files Attached Files

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Note !
    I used XP ACCESS DB .You have no problems if you have access 2000 db.

  5. #5
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Cursors are not managed by datatables in .NET, rather by a mysterious fella' named the CurrencyManager. You increment/decrement the position property to navigate through the cursor. The CurrencyManager also handles the addition/deletion of records.

    Code:
       this.BindingContext[ds, "Customers"].Position++;
    This code snippet is in C#, but I bet you get the picture...

  6. #6
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Hmm , this sounds easier . Is it available for bindings only ?

  7. #7
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    For each distinct datasource on a form, there is an associated CurrencyManager. His job is to police the currency/updating of all controls that are bound to the particular datasource.

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