"unable to insert or update a view" [message #315777] |
Tue, 22 April 2008 14:34  |
deahayes3
Messages: 203 Registered: May 2006
|
Senior Member |

|
|
Please help,
I am using forms6i, and I have a datablock that is a view, I have a button where I would like to clear the block then insert in one of the fields to execute a query, but it keeps telling I cant insert into a view, but all I want to do is enter query and execute then display the results in the datablock.....can anyone help me solve this?
|
|
|
|
Re: "unable to insert or update a view" [message #315792 is a reply to message #315780] |
Tue, 22 April 2008 15:38   |
deahayes3
Messages: 203 Registered: May 2006
|
Senior Member |

|
|
ok, i set a DEFAULT_WHERE and then executed a query , however the datablock displays 10 records at a time, what can I do to go to the next line/record without erasing the first, this is what I have
I have a non datablock item called employee_no and a button called ENTER EMPLOYEE NUMBER, this button uses the default_where clause and displays on the screen fine , however if i decided to put in another employee number it erases the first, this is what I have....
IF :control_x.employee_no is not null then
Set_Block_Property('EMPL_MASTER_V',DEFAULT_WHERE,'employee_number = :control_x.employee_no');
Execute_Query;
Next_Record;
End if;
|
|
|
|
|
|
|
|
|
Re: "unable to insert or update a view" [message #316115 is a reply to message #316003] |
Wed, 23 April 2008 16:15   |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Sure.SQL> select 'where id = ' || 1 res from dual;
RES
------------
where id = 1
SQL> select 'where id = ' || 1 || ' or id = ' || 2 res from dual;
RES
----------------------
where id = 1 or id = 2
SQL> select 'where id = ' || 1 || ' or id = ' || 2 || ' or id = ' || 3 res
2 from dual;
RES
--------------------------------
where id = 1 or id = 2 or id = 3
SQL>
[Updated on: Mon, 28 April 2008 20:50] by Moderator Report message to a moderator
|
|
|
Re: "unable to insert or update a view" [message #316315 is a reply to message #316115] |
Thu, 24 April 2008 10:43  |
deahayes3
Messages: 203 Registered: May 2006
|
Senior Member |

|
|
Thanks I tried the following and it worked as well .....
:global.old_emp_no := new_empl_num||','||:global.old_emp_no;
SELECT RTRIM(:global.old_emp_no,',')--remove extra comma
into vnum
FROM DUAL;
:global.old_emp_no:= vnum;
Set_Block_Property('EMPL_MASTER_V',DEFAULT_WHERE,'employee_number IN ('||vnum||')');
Thanks so much for the help.
|
|
|