|
|
|
|
|
Re: May you help me plz? [message #645912 is a reply to message #645901] |
Wed, 16 December 2015 03:49 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
General comments on the code:
0) Always post code here as text in code tags, as explained here: How to use [code] tags and make your code easier to read?, rather than as an image. It makes our life a lot easier.
1) Variables should be typed to columns using %TYPE where ever possible.
2) You don't need to use a select from dual to run to_char in PL/SQL you could have just done this:
DECLARE
l_date_val provweb.clave%TYPE;
BEGIN
l_date_val := to_char(SYSDATE, 'YYYY%$DD');
3) The first assignment of a value to :b01.clave is pointless, it just gets overridden by the subsequent assignments.
4) The second IF should be turned into an ELSE of the first IF
5) You appear to be updating the password to a hard-coded value. Are you sure that's what you want?
6) You've got a variable you aren't using.
7) As LF already suggested that select needs a no_data_found exception handler.
8) Shouldn't the commit be at the end?
9) All forms items should be prefixed with the block name when you refer to them.
10) Is the block based on the provweb table? If it is then most of this code is pointless. Forms can work out for itself if an insert or update is needed and will automatically perform it when you try to save.
|
|
|