1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- $PBExportHeader$f_get_outerconnection.srf
- global type f_get_outerconnection from function_object
- end type
- forward prototypes
- global function integer f_get_outerconnection (ref long arg_connectionid, ref string arg_msg)
- end prototypes
- global function integer f_get_outerconnection (ref long arg_connectionid, ref string arg_msg);Int rslt = 1
- Long cnt = 0
- SELECT count(*) INTO :cnt
- FROM u_outerconnection
- Where ConnectionType = 0;
- IF sqlca.SQLCode <> 0 THEN
- rslt = 2
- GOTO ext
- END IF
- IF cnt = 0 THEN
- rslt = 2
- GOTO ext
- END IF
- SELECT top 1 connectionid
- INTO :arg_connectionid
- FROM u_outerconnection
- Where ConnectionType = 0;
- IF sqlca.SQLCode <> 0 THEN
- arg_msg = '查询附件数据库资料失败,'+sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
- ext:
- RETURN rslt
- end function
|