CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: last record

  1. #1
    Join Date
    Jul 1999
    Posts
    104

    last record

    How can I find out which record has last been added to a table
    (without using autonumber)


  2. #2
    Join Date
    Jul 1999
    Location
    Athens, Hellas
    Posts
    769

    Re: last record

    I think there is a switch (SQL) called Top1 which returns the last record (maximum ID). So, you might use something like:

    select Top1 from 'Table'




    Michael Vlastos
    Company MODUS SA
    Development Department
    Athens, Greece
    Tel: +3-01-9414900

  3. #3
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: last record

    There is a .LastModified property of the Recordset that provides the last edited/added record for BookMarking purpose. It doesn't return you the record. But you can use something like
    with tmprecset
    .BookMark = .LastModified
    ' here you can use the fields
    end with
    Ravi Kiran


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

Featured