Revision as of 08:33, 27 May 2011 by hamishwillee (Talk | contribs)

Symbian @@identity DBMS

From Nokia Developer Wiki
Jump to: navigation, search

@@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);
28 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.