CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2005
    Posts
    97

    SQLite Query!!!!

    Hi all,
    Can anybody help me to create query , to find out the key_id(primary key)
    for the last saved record.
    Key_id is not sequential it can be any random no.

    Any help will be appreciated.

    Thanx

  2. #2
    Andy Tacker is offline More than "Just Another Member"
    Join Date
    Jun 2001
    Location
    55°50' N 37°39' E
    Posts
    1,503

    Re: SQLite Query!!!!

    well if you will search MSDN or even MS SQL Book, you will find the way to create a stored procedure which will return the ID after insertion.

    be a little lazy to do a search.

    Andy
    If you think you CAN, you can, If you think you CAN'T, you are probably right.

    Have some nice Idea to share? Write an Article Online or Email to us and You may WIN a Technical Book from CG.

  3. #3
    Join Date
    Apr 2002
    Location
    Egypt
    Posts
    2,210

    Re: SQLite Query!!!!

    use : sqlite_last_insert_rowid()
    http://www.sqlite.org/faq.html#q1
    Hesham A. Amin
    My blog , Articles


    <a rel=https://twitter.com/HeshamAmin" border="0" /> @HeshamAmin

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