CARIS HPD : HPD® Server API : Projects : P_PROJECT_MANAGER : LOCKPROJECT
 

LOCKPROJECT

Lock the specified project.

Locking projects prevents other users from editing the project while it being modified by the current Oracle transaction. The lock is in effect for the duration of the Oracle transaction.

Input

Parameter

Type

Description

v_project_id

NUMBER

The ID of the project.

Output

Type

Description

VARCHAR2

Returns name of user who has already locked the project, preventing a lock from being obtained.

NULL if you successfully locked the project.

Example

declare

    v_project_id    constant PROJECT.PJ_ID%TYPE:= 1;

    v_user_locking  varchar2(240 char);

begin

    v_user_locking := P_PROJECT_MANAGER.LOCKPROJECT(v_project_id);

    DBMS_OUTPUT.PUT_LINE('--*-- User holding the lock: '||v_user_locking);

end;

/

Exceptions

None at this time.