CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 1999
    Location
    Lodz, Poland
    Posts
    26

    How to retrieve identity of inserted row (OLE DB)

    I use CRowset::Insert() metod to insert a row. What should I do to retrieve value from its identity column? (I use Microsoft OLE DB Provider for SQL Server and SQL Server 7.0)


  2. #2
    Guest

    Re: How to retrieve identity of inserted row (OLE DB)

    Hi,

    After you've inserted nw record try this ( SQL Server only ):

    Select @@IDENTITY from owner.table

    I guess it will work.


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