f_get_db_spid.srf 454 B

123456789101112131415161718192021222324252627282930
  1. $PBExportHeader$f_get_db_spid.srf
  2. global type f_get_db_spid from function_object
  3. end type
  4. forward prototypes
  5. global function integer f_get_db_spid ()
  6. end prototypes
  7. global function integer f_get_db_spid ();Integer row
  8. Integer ll_spid
  9. datastore ds
  10. ds = CREATE datastore
  11. ds.DataObject = "dw_ddd_db_spid"
  12. ds.SetTransObject(sqlca)
  13. row = ds.Retrieve()
  14. IF row > 0 THEN
  15. ll_spid = ds.Object.spid[row]
  16. END IF
  17. DESTROY ds
  18. RETURN ll_spid
  19. end function