0 Replies Latest reply on Jul 9, 2013 1:29 AM by tiplip

    How to use sequence in TDS?

    tiplip

      I have multiple DBs in a multiple threaded application, meanwhile, it's on TDS, and I'd like to enalbe each DB to increment its key automatically, what question should I be careful?

       

      1. create sequence db for each its caller DB?

      2. wrap sequence db->get like this?

       

      begain transaction;

      key = sequence_db->get;

      put data into main db with key;

      commit transaction;

      or abort transaction

       

      can I rollback to retry if something exception happens?