Beispiel #1
0
        public static Int64 GetNextSequence(TSequenceNames ASequence, TDataBase ADataBase = null)
        {
            Int64 NewSequenceValue = 0;

            TDBTransaction Transaction  = new TDBTransaction();
            bool           SubmissionOK = false;

            TDataBase db = DBAccess.Connect("GetNextSequence " + ASequence.ToString(), ADataBase);

            db.WriteTransaction(
                ref Transaction, ref SubmissionOK,
                delegate
            {
                NewSequenceValue = db.GetNextSequenceValue(ASequence.ToString(),
                                                           Transaction);

                SubmissionOK = true;
            });

            return(NewSequenceValue);
        }
Beispiel #2
0
        public static Int64 GetNextSequence(TSequenceNames ASequence)
        {
            bool NewTransaction;

            TDBTransaction Transaction = DBAccess.GDBAccessObj.GetNewOrExistingTransaction(IsolationLevel.Serializable, out NewTransaction);

            Int64 NewSequenceValue = DBAccess.GDBAccessObj.GetNextSequenceValue(ASequence.ToString(), Transaction);

            if (NewTransaction)
            {
                DBAccess.GDBAccessObj.CommitTransaction();
            }

            return(NewSequenceValue);
        }
Beispiel #3
0
        public static Int64 GetNextSequence(TSequenceNames ASequence)
        {
            bool NewTransaction;

            TDBTransaction Transaction = DBAccess.GDBAccessObj.GetNewOrExistingTransaction(IsolationLevel.Serializable, out NewTransaction);

            Int64 NewSequenceValue = DBAccess.GDBAccessObj.GetNextSequenceValue(ASequence.ToString(), Transaction);

            if (NewTransaction)
            {
                DBAccess.GDBAccessObj.CommitTransaction();
            }

            return NewSequenceValue;
        }
Beispiel #4
0
        public static Int64 GetNextSequence(TSequenceNames ASequence)
        {
            Int64 NewSequenceValue = 0;

            TDBTransaction Transaction = null;
            bool SubmissionOK = false;

            DBAccess.GDBAccessObj.GetNewOrExistingAutoTransaction(IsolationLevel.Serializable, ref Transaction, ref SubmissionOK,
                delegate
                {
                    NewSequenceValue = DBAccess.GDBAccessObj.GetNextSequenceValue(ASequence.ToString(), Transaction);
                    SubmissionOK = true;
                });

            return NewSequenceValue;
        }
Beispiel #5
0
        public static Int64 GetNextSequence(TSequenceNames ASequence)
        {
            Int64 NewSequenceValue = 0;

            TDBTransaction Transaction  = null;
            bool           SubmissionOK = false;

            DBAccess.GDBAccessObj.GetNewOrExistingAutoTransaction(IsolationLevel.Serializable, ref Transaction, ref SubmissionOK,
                                                                  delegate
            {
                NewSequenceValue = DBAccess.GDBAccessObj.GetNextSequenceValue(ASequence.ToString(), Transaction);
                SubmissionOK     = true;
            });

            return(NewSequenceValue);
        }