From 6bd8f2d96c3ea7c29bd69c15eb20035f2bd6334d Mon Sep 17 00:00:00 2001 From: PriestJ Date: Mon, 21 Jan 2008 11:45:25 +0000 Subject: [PATCH] Fixed bug in drawing_exists function it never returned a value if the drawing wasn't found, now returns false. Added null checks on the update association so that the where clause has a chance of working git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3311 248e525c-4dfb-0310-94bc-949c084e9493 --- Modules/MIP_FILES.pck | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Modules/MIP_FILES.pck b/Modules/MIP_FILES.pck index bb9bb36..eb78f81 100644 --- a/Modules/MIP_FILES.pck +++ b/Modules/MIP_FILES.pck @@ -51,6 +51,8 @@ create or replace package body MIP_FILES as CLOSE c_file_exists; if l_file_exists is not null and l_file_exists>0 then return true; + else + return false; end if; end drawing_file_exists; /* @@ -83,7 +85,7 @@ create or replace package body MIP_FILES as returning id into l_doc_id; --set up a role for the document update document_roles set docu_id = l_doc_id - where drwg_code = p_drwg_code or qute_id = p_qute_id or enqu_id = p_enqu_id; + where drwg_code = nvl(p_drwg_code,'') or qute_id = nvl(p_qute_id,0) or enqu_id = nvl(p_enqu_id,0); --if it works then return true return true; end update_file_association;