The value of identity fields within transactions

2 posts, 0 answers
  1. Robert Gibbins
    Robert Gibbins avatar
    6 posts
    Member since:
    Sep 2009

    Posted 09 Sep 2009 Link to this post

    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.
  2. Robert Gibbins
    Robert Gibbins avatar
    6 posts
    Member since:
    Sep 2009

    Posted 09 Sep 2009 Link to this post

    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.
  3. DevCraft banner
Back to Top