Namespaces
Variants
Actions

Symbian @@identity DBMS

Jump to: navigation, search
Article Metadata

Article
Created: rathodavinash (28 Jun 2007)
Last edited: hamishwillee (26 Jul 2012)

@@Identity in MS SQL Server:

Is a system function that returns the last-inserted identity value. After an INSERT, SELECT INTO, or bulk copy statement is completed, @@IDENTITY contains the last identity value that is generated by the statement. If the statement did not affect any tables with identity columns, @@IDENTITY returns NULL.

To achieve this in Symbian's DBMS the following code can be used:

table.InsertL();        // insert empty record to table
 
// get row id value (the database already set id for this row)
TUint8 id = table.ColUint8(yourColSet->ColNo(KYourTableIdCol));
 
// and then just set other fileds
table.SetColL(yourColSet->ColNo(KYourTableFieldCol), yourValue);
...
This page was last modified on 26 July 2012, at 07:28.
54 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved