project BLF > class Persistence (Progress) > method GetSeqDB

function returns character

Description

returns the logical database name containing this sequence


Parameters


icSequenceinputcharacter


Internal usage


BLF
method Progress.GetCurrentValue
method Progress.GetNextValue


program code (program1/progress.p)

do viDB = 1 to num-dbs:
   if dbtype(viDB) <> "Progress" then next.

   assign vcDBName = ldbname(viDB).

   create buffer vhBuffer for table vcDBName + "._Sequence" in widget-pool "non-persistent".

   vhBuffer:find-first("where _seq-name = '" + icSequence + "'", no-lock) no-error.

   if vhBuffer:available then do:
      delete object vhBuffer.
      /* Check to see if db is not Progress and return the correct logical name for it */
      do viSDB = 1 to num-dbs:
         if dbtype(viSDB) = "Progress" then next.
         if sdbname(viSDB) = vcDBName then assign vcDBName = ldbname(viSDB). 
      end.   
      return vcDBName.
   end.
   delete object vhBuffer.
end.