Results 1 to 3 of 3

Thread: I can't get the record number in ADO recordset [RESOLVED]

  1. #1

    Thread Starter
    Junior Member Jethro Tull's Avatar
    Join Date
    May 2005
    Location
    Buenos Aires - Argentina
    Posts
    31

    I can't get the record number in ADO recordset [RESOLVED]

    I've tried with .AbsolutePosition but it gets -2 or something like this

    Can somebody help me, please?

    Thanks in advance.
    Last edited by Jethro Tull; May 26th, 2005 at 05:09 PM. Reason: Resolved

  2. #2

    Thread Starter
    Junior Member Jethro Tull's Avatar
    Join Date
    May 2005
    Location
    Buenos Aires - Argentina
    Posts
    31

    Re: I can't get the record number in ADO recordset

    My mistake, the value was -3 (what means EOF), I believe I was in the first record....
    AMD Athlon 2.4 GHz - 512 Mb RAM - Win XP Pro SP2

  3. #3
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: I can't get the record number in ADO recordset [RESOLVED]

    Quote Originally Posted by Jethro Tull
    I've tried with .AbsolutePosition but it gets -2 or something like this

    Can somebody help me, please?

    Thanks in advance.
    The AbsolutePosition is not correct if u are using a Server Side cursor.
    Before opening the recordset, make it a Client side cursor
    VB Code:
    1. rs.CursorLocation = adUseClient

    Then the absolute position should return correct value
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

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