0 Replies Latest reply: Jul 8, 2013 8:29 PM by tiplip RSS

    How to use sequence in TDS?


      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?