@@identity в Symbian DBMS
hamishwillee
(Talk | contribs) m (Bot fixing redirect link) |
hamishwillee
(Talk | contribs) m (Hamishwillee - Fix categories) |
||
| (4 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
| − | + | [[Category:Symbian C++]][[Category:Lang-Russian]][[Category:Code Snippet]][[Category:Files/Data]] | |
| − | ---- | + | {{ArticleMetaData |
| − | [ | + | |sourcecode= <!-- Link to example source code e.g. [[Media:The Code Example ZIP.zip]] --> |
| − | [[ | + | |installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) --> |
| − | [[ | + | |devices= <!-- Devices tested against - e.g. ''devices=Nokia 6131 NFC, Nokia C7-00'') --> |
| + | |sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) --> | ||
| + | |platform= <!-- Compatible platforms - e.g. Symbian^1 and later, Qt 4.6 and later --> | ||
| + | |devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) --> | ||
| + | |dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 --> | ||
| + | |signing=<!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer --> | ||
| + | |capabilities=<!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. --> | ||
| + | |keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase --> | ||
| + | |id= <!-- Article Id (Knowledge base articles only) --> | ||
| + | |language=Lang-Russian | ||
| + | |translated-by=[[User:Truf]] | ||
| + | |translated-from-title=Symbian @@identity DBMS | ||
| + | |translated-from-id=95582 | ||
| + | |review-by=<!-- After re-review: [[User:username]] --> | ||
| + | |review-timestamp=<!-- After re-review: YYYYMMDD --> | ||
| + | |update-by=<!-- After significant update: [[User:username]]--> | ||
| + | |update-timestamp=<!-- After significant update: YYYYMMDD --> | ||
| + | |creationdate=20071028 | ||
| + | |author=[[User:Rathodavinash]] | ||
| + | }} | ||
Согласно [http://msdn.microsoft.com/ru-ru/library/ms187342.aspx MSDN] @@Identity в Transact-SQL определена следующим образом: | Согласно [http://msdn.microsoft.com/ru-ru/library/ms187342.aspx MSDN] @@Identity в Transact-SQL определена следующим образом: | ||
| Line 21: | Line 40: | ||
... | ... | ||
</code> | </code> | ||
| + | <!-- Translation --> [[en:Symbian @@identity DBMS]] | ||
Latest revision as of 05:07, 9 December 2011
Метаданные
Статья
Перевод:
Оригинал: Symbian @@identity DBMS
Последнее редактирование: hamishwillee
(09 Dec 2011)
Согласно MSDN @@Identity в Transact-SQL определена следующим образом:
Системная функция, которая возвращает значение идентификатора, вставленное последним.После завершения инструкций INSERT, SELECT INTO или массового копирования функция @@IDENTITY возвращает последнее значение идентификатора, сформированное инструкцией. Если инструкция не обработала ни одной таблицы, содержащей столбцы идентификаторов, функция @@IDENTITY возвращает значение NULL.
Чтобы достичь подобной функциональности в Symbian DBMS, используйте следующий код:
table.InsertL(); // вставляем пустую запись в таблицу
// получим значение id этой записи
// (база данных уже сгенерировала id для этой записи)
TUint8 id = table.ColUint8(yourColSet->ColNo(KYourTableIdCol));
// а затем установим значение других столбцов
table.SetColL(yourColSet->ColNo(KYourTableFieldCol), yourValue);
...

