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); }
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); }
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; }
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; }
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); }