1234567891011121314151617181920212223242526272829303132 |
- $PBExportHeader$f_get_curdb.srf
- global type f_get_curdb from function_object
- end type
- forward prototypes
- global function integer f_get_curdb (ref string arg_msg)
- end prototypes
- global function integer f_get_curdb (ref string arg_msg);//取当前数据库的ID
- //f_get_curdb(arg_msg)
- Int rslt = 1
- Int li_hisflag,li_switchflag
- Long cnt
- String ls_prg_id,ls_cur_version,ls_superpsw,ls_switchpsw
- uo_getdbinfo uo_dbinfo
- uo_dbinfo = CREATE uo_getdbinfo
- rslt = uo_dbinfo.get_dbinfo(sqlca,li_hisflag,ls_superpsw,ls_prg_id,ls_cur_version,li_switchflag,ls_switchpsw,arg_msg)
- if ls_cur_version<>'' then sys_curDB_version=ls_cur_version
- IF rslt <> 1 THEN GOTO ext
- IF li_hisflag = 1 THEN if_hisdb = TRUE
- IF li_switchflag = 1 THEN if_switchdb = TRUE
- if ls_superpsw <> '' then sys_superpsw = ls_superpsw
- if ls_switchpsw <> '' then sys_switchpsw = ls_switchpsw
- ext:
- RETURN rslt
- end function
|