Re: Weird Error -- Update statement returning no data found error

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Tue, 11 Feb 2003 21:28:50 GMT
Message-ID: <MPG.18b30af1201e252898969b_at_news.la.sbcglobal.net>


yopcaw9_at_yahoo.com said...
> HI
>
> In the block based on a view(in oracle forms), I have an update sql in
> when validate item trigger for a non database text item.
>
> Based on the value I enter in this item , I update different tables.
>
> Update emp
> where ename='test'
> and sal=:block.item -- non database text item
>
> Very interestingly I'm getting no data found error when this piece of
> sql is getting executed.
>
> I know very well that an update statement cannot return a no data
> found.
>
> Can you guys share any solution in mind for the above...or how to
> trouble shoot it...
>

I don't see your code, but if either ename or sal is null...

If you want a NULL to pass the test:

  where nvl(ename,'test') = 'test'
  and nvl(sal,:block.item) = :block.item

If you don't want a NULL to pass the test:

  where nvl(ename,'gobbledeegook') = 'test'   and nvl(sal,1000000) = :block.item

-- 
/Karsten
Received on Tue Feb 11 2003 - 22:28:50 CET

Original text of this message