当前位置: 动力学知识库 > 问答 > 编程问答 >

oracle - Date today from a Display Item insert to database

问题描述:

I made a table that has a column Date_Created in it. And in my form I put a display item above having a formula of sysdate so that each time the form runs and insert new data, the date will always e updated but when I looked up into the database, Date_Created is blank!

What causes this problem? tnx

screen shots:

http://static.tumblr.com/ezdv8nl/YcUmu2vcc/untitled_1.jpg

My code for the submit button:

 DECLARE

adminPass VarChar(20);

alert Number;

BEGIN

IF :USERS.PASS != :USERS.PASS2 OR :USERS.PASS IS NULL THEN

MESSAGE('Passwords did not match');

GO_ITEM('PASS2');

ELSIF :USERS.ACCESS_LEVEL = 'admin' THEN

SELECT password

INTO adminPass

FROM admin_pass_history

WHERE id = (SELECT MAX(id) FROM admin_pass_history);

IF :USERS.ADMIN_PASS IS NULL THEN

MESSAGE('Please enter the Administrator Password');

ELSIF :USERS.ADMIN_PASS != adminPass THEN

MESSAGE('Administrator Password did not match');

GO_ITEM('ADMIN_PASS');

ELSE

COMMIT;

alert:= show_alert('USER_CREATED');

IF alert = alert_button1 THEN

OPEN_FORM('C:\Documents and Settings\Richzer Cruz\Desktop\LOGIN.fmx');

END IF;

END IF;

END IF;

EXCEPTION

WHEN NO_DATA_FOUND THEN

MESSAGE('Administrator Password did not match');

GO_ITEM('ADMIN_PASS');

END;

网友答案:

The first thing is to make sure that your display item is a database item property set to Yes.

网友答案:

From what I remember items with formulas are not saved to database. Remove formula and use WHEN-CREATE_RECORD trigger.

分享给朋友:
您可能感兴趣的文章:
随机阅读: