Results 1 to 5 of 5
  1. #1
    Join Date
    May 2005
    Posts
    54

    Unanswered: problem in query

    Dear All

    I'm using the following code on 'when-button-pressed' trigger for delete a record.

    update billinghr set billinghr.status='FALSE'
    where :del_record.empno=billinghr.empno;
    commit;
    clear_form;


    it has no compilation error and no error at runtime but it never update field status in table billinghr.




    Regards.

    WASIM YASIN

  2. #2
    Join Date
    Mar 2008
    Posts
    89
    It would be good to know where your bind variable ":del_record.empno" gets its value from, as it looks like this WHERE clause just doesn't result to true.
    "My brain is just no good at being a relational Database - my relations suck real bad!"

  3. #3
    Join Date
    May 2005
    Posts
    54
    update billinghr b set b.status='FALSE'
    where :billinghr.empno=b.empno;
    commit;
    clear_form;


    :billinghr.empno is a field on form. This field gets value from user in query mode and then ctrl+F11 to get results in the relevant fields. :billinghr.empno field also has data. i.e. form is now showing the information about an employee having employee no =:billinghr.empno. At this stage if user wants to delete this record then he pressed a button which invokes the trigger and set status='FALSE'.
    but its not setting the value.

  4. #4
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Your code works perfectly OK on Forms 10g. Which version do you use?

    Did you make sure that record with this "empno" really exists in the "billinghr" table? Because, if it does not, there's nothing to update.

  5. #5
    Join Date
    May 2005
    Posts
    54
    I'm using 9i. the empno exist in table as user first retrieve it by a query and press button for deletion.

    Wasim

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •