0

我做了一个表格,里面有一列Date_Created。在我的表单中,我在上面放置了一个显示项目,其中有一个公式,sysdate这样每次表单运行并插入新数据时,日期总是会更新,但是当我查看数据库时,Date_Created它是空白的!是什么导致了这个问题?tnx

屏幕截图:

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

我的提交按钮代码:

    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;
4

2 回答 2

0

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

于 2013-10-03T08:56:44.223 回答
0

据我记得,带有公式的项目不会保存到数据库中。删除公式并使用 WHEN-CREATE_RECORD 触发器。

于 2013-10-20T11:02:19.537 回答