f_rp_excute.srf 621 B

1234567891011121314151617181920212223242526272829303132
  1. $PBExportHeader$f_rp_excute.srf
  2. global type f_rp_excute from function_object
  3. end type
  4. forward prototypes
  5. global function string f_rp_excute (string arg_command)
  6. end prototypes
  7. global function string f_rp_excute (string arg_command);string l_rstl
  8. string ls_rs
  9. integer ll_row
  10. DataStore ds_cmp
  11. ds_cmp = Create DataStore
  12. ds_cmp.DataObject = "ds_rp_event"
  13. ll_row = ds_cmp.InsertRow(0)
  14. ls_rs = ds_cmp.Modify("cmp.Expression='"+ arg_command + "'")
  15. IF ls_rs <> '' THEN
  16. l_rstl="error"
  17. GOTO ext
  18. END IF
  19. ds_cmp.AcceptText()
  20. l_rstl = string(dec(ds_cmp.Object.cmp[ll_row]))
  21. ext:
  22. Destroy ds_cmp
  23. return l_rstl
  24. end function