f_get_curdb.srf 885 B

1234567891011121314151617181920212223242526272829303132
  1. $PBExportHeader$f_get_curdb.srf
  2. global type f_get_curdb from function_object
  3. end type
  4. forward prototypes
  5. global function integer f_get_curdb (ref string arg_msg)
  6. end prototypes
  7. global function integer f_get_curdb (ref string arg_msg);//取当前数据库的ID
  8. //f_get_curdb(arg_msg)
  9. Int rslt = 1
  10. Int li_hisflag,li_switchflag
  11. Long cnt
  12. String ls_prg_id,ls_cur_version,ls_superpsw,ls_switchpsw
  13. uo_getdbinfo uo_dbinfo
  14. uo_dbinfo = CREATE uo_getdbinfo
  15. rslt = uo_dbinfo.get_dbinfo(sqlca,li_hisflag,ls_superpsw,ls_prg_id,ls_cur_version,li_switchflag,ls_switchpsw,arg_msg)
  16. if ls_cur_version<>'' then sys_curDB_version=ls_cur_version
  17. IF rslt <> 1 THEN GOTO ext
  18. IF li_hisflag = 1 THEN if_hisdb = TRUE
  19. IF li_switchflag = 1 THEN if_switchdb = TRUE
  20. if ls_superpsw <> '' then sys_superpsw = ls_superpsw
  21. if ls_switchpsw <> '' then sys_switchpsw = ls_switchpsw
  22. ext:
  23. RETURN rslt
  24. end function