Hi All,
I am new to Oracle forms, I have a question,
I create a view with two tables, which is referred in the block of the froms, if i try to query the data it will populate the values but if i try to update the data it will not allow. But i need to update the data.
Query is like
select a.col1,b.col1
from table1
, (select b.col1,b.col2 from table2 ) t2
where a.col2 = b.col2
Please help me to proceed further.
Regards
Shankar
3 4346
hello, Shankar.
Usually stored procedures are used to make an update, or if you use oracle 9i or higher you can write trigger "instead of update" for this view .and put your logic in it.
example of "instead of update" trigger for view: -
CREATE OR REPLACE TRIGGER your_view_vu_u
-
INSTEAD OF UPDATE
-
ON your_view
-
FOR EACH ROW
-
BEGIN
-
-- We can update col3
-
IF (:NEW.col3 <> :OLD.col3) THEN
-
UPDATE b
-
SET col3 = :NEW.dname,
-
WHERE col2 = :OLD.col2;
-
END IF;
-
END;
-
-
Regards,
Michael Milonov
http://www.snotratech.com
Hi All,
I am new to Oracle forms, I have a question,
I create a view with two tables, which is referred in the block of the froms, if i try to query the data it will populate the values but if i try to update the data it will not allow. But i need to update the data.
Query is like
select a.col1,b.col1
from table1
, (select b.col1,b.col2 from table2 ) t2
where a.col2 = b.col2
Please help me to proceed further.
Regards
Shankar
Hi Michael,
I need to do the updation from the front end. If i refer the view from the block then i will not allow to edit any columns.
Regards
Shankar.M
Hello, Shankar.
IMHO the right solution is to create "view", for example
"create or replace view your_view_name as
select * from your tables.... "
and then write trigger "instead of update" for this view (see code in previous post). But of cource it is advice only.
Best Regards,
Michael Milonov http://www.snotratech.com
Hi Michael,
I need to do the updation from the front end. If i refer the view from the block then i will not allow to edit any columns.
Regards
Shankar.M
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Andreas Lauffer |
last post by:
I changed from Access97 to AccessXP and I have immense performance
problems.
Details:
- Access XP MDB with Jet 4.0 ( no ADP-Project )
- Linked Tables to SQL-Server 2000 over ODBC
I used...
|
by: Jay McGrath |
last post by:
Does anyone know if it is possible to prevent a user from accessing
the tables in an MDE file? I can go to my start-up menu and limit
access to various functions, etc. I could even disable the...
|
by: Aladdin |
last post by:
I have an MS Access form on which I have a listbox listing tables in
that database. I want to be able to click on any of those tables and
view its contents on the same form using subforms or any...
|
by: Bob C. |
last post by:
When I migrated my tables to SQL Server I needed a way to overcome the
slow performance of the Find method on my recordsets. Although this
can be done by accessing the table directly using dao and...
|
by: sea |
last post by:
If a runtime installation of Access is created and installed on a
client machine that has a full verion of access, will it still be
possible to view the tables and queries in design view but not...
|
by: dskillingstad |
last post by:
I've been struggling with this problem for some time and have tried
multiple solutions with no luck.
Let me start with, I'm a novice at Access and I'm not looking for
someones help to design my...
|
by: Julia |
last post by:
Hello there.
I have a question somewhat related to this topic, and I don't know
where else to go. I hope somebody can help. I've created a database
in access, that I'd like to share with less...
|
by: Alan Silver |
last post by:
Hello,
I understand the issue that tables should be used for tabular data and
not for layout, but I would like some clarification as to exactly what
constitutes tabular data.
For example, if...
|
by: jayhart |
last post by:
Im having an issue with a database where Im missing tables and
forms............but they still seem to be present (but not
displayed).
When Im looking at the table list, the table is not listed...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |