×
Namespaces

Variants
Actions

Symbian @@identity DBMS

From Nokia Developer Wiki
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.
30 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×