This is a migrated thread and some comments may be shown as answers.

The value of identity fields within transactions

1 Answer 32 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Robert Gibbins
Top achievements
Rank 1
Robert Gibbins asked on 09 Sep 2009, 10:13 AM
Hello All,

How do I find the identity based primary key value of a class before the transaction is committed?

The following used to work in older versions of open access but does not in the current release

scope.transaction.begin
dim NewClass as new PersistentClass
scope.add(NewClass)
dim oid=scope.GetObjectId(NewClass) 
'the identity based id for the new record is now populated
dim Newid=NewClass.id
...
other code
...
scope.transaction.commit

Thanks,

Robert Gibbins.

1 Answer, 1 is accepted

Sort by
0
Robert Gibbins
Top achievements
Rank 1
answered on 09 Sep 2009, 10:43 AM
Hello All,

My Mistake here, during the upgrade process the key generator had been reset from AUTOINC to None.

Please disregard the above.

Thanks,

Robert.
Tags
Development (API, general questions)
Asked by
Robert Gibbins
Top achievements
Rank 1
Answers by
Robert Gibbins
Top achievements
Rank 1
Share this question
or