CREATING A FORM UTILIZING MULTIPLE TABLES
I'd like to know if it's feasable to create a form using multiple tables and if so, how?
Thanx
sgtmaj,
It's feasible. You'll have to create the form manually. This part of the documentation describes how that's done.
http://download-west.oracle.com/docs/cd/B19306_01/appdev.102/b16373/bldapp.htm#sthref960
Sergio
Similar Messages
-
Microsoft Access 2010 Creating a Form from Multiple Tables
Hi.
I am brand new to Microsoft Access and have had some exciting success making forms from single tables. This has made my data entry life much easier. However, I am continually stumped on one form I want to make. I would like to make a form that will let me
update which brands retailers are selling. Most of this information is in my SalesHx table. However, my SalesHx table only uses RetailerID and BrandID to record history. The Brand's name (linked to a BrandID) is stored in my Brand Table and the Retailer name
is stored in my Retailer table (linked to a RetailerID). I would like to be able to see the brand's name and the retailer's name when entering in data on a form, since I cannot remember the ids that associate with the names. I have been able to make a form,
with a subform, that displays all of the information I want to see. When I update this form, though, with a new record, it invariably thinks that I am adding an entirely new record, not simply recording a new sales date for an already known brand. Even if
I make the brand name a combo box that is limited to the fields on my table, this still happens. I will have BrandX as brand number 100 and as brand number 300 if I add it in through my sales history form. I am ready to throw access out the window. Can anyone
offer advice?When I update this form, though, with a new record, it invariably thinks that I am adding an entirely new record, not
simply recording a new sales date for an already known brand.
In what table is the SalesDate recorded?
Build a little, test a little -
How to build a form with multiple tables in oracle application express
Hi everyone,
I have got problem in building a form with multiple tables.I have a main table with (20) columns and this main table is related to the other tables with the primary key-foreign key relation ship.My requirement is i have to build a form which has fields from many tables and all the fields are related to the main table using (ID) column.In that form if i enter ID field i have to get information from differnt tables.
Please help me to solve this (building a form with mutiple tables)
Thank you
sansSans,
I am no Apex expert, but with a situation as "complex" as yours, have you thought about creating a VIEW that joins these 7/8 tables, placing an INSTEAD OF trigger on that view to do all the business logic in the database, and base your application on the view?
This is the "thick-database" approach that has been gaining momentum of late. The idea is to put your business logic in the database wherever possible, and let the application (Form, Apex, J2EE, whatever) concentrate on UI issues, -
[ADF Help] How to create a view for multiple tables
Hi,
I am using Jdeveloper 11G and ADF framework, and trying to create a view to update multiple tables.
ex:
Table A has these fields: ID, Name
Table B has these fields: ID, Address
A.ID and B.ID are primary keys.
B.ID has FK relationship with A.ID
(basically, these tables have one-to-one relation)
I want to create a view object, which contains these fields: B.ID (or A.ID), A.Name, B.Address.
So I can execute C,R,U,D for both tables.
I create these tables in DB, and create entity objects for these tables.
So there are 2 entity objects and 1 association.
Then I create a view object based on B and add fields of A into the view:
If the association is not a "Composition Association",
when I run the model ("Oracle Business Component Browser") and try to insert new data, fields of A can't edit.
If the association is a "Composition Association", and click the insert button, I will get
"oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity"
If I create a view object based on A and add filed of B into the view:
When I run the model and try to insert new data, fields of B can't edit, no matter the association is or is not a composition association.
So... how can I create a view for multiple tables correctly?
Thanks for any advices!
Here are some pictures about my problem, if there is any unclear point, please let me know.
http://leonjava.blogspot.com/2009_10_01_archive.html
(A is Prod, B is CpuSocket)
Edited by: user8093176 on Oct 25, 2009 12:29 AMHi Branislav,
Thanks, but the result is same ....
In the step 2 of creating view object, I can select entity objects to be added in to the view.
If I select A first, and then select B (the "Source Usage" of B is A), then finishing the wizards.
When I try to create a new record in the view, I can't edit any properties of B (those files are disabled).
If I select B first, and then select A in crating view object, the result is similar ...
Thanks for any further suggestion.
Leon -
Is it possible to create a form with multiple form fields on a single line?
Is it possible to create a form with multiple form fields on a single line? I can't find anything in the documentation or a template that does this.
I am trying to create a "documents received" checklist with a check box on the left margin, a date-received field to the right of the check box and and a description of the document (Formatted Text) on the far right.
In the past I have entered the Fixed Text with a word processor, published it to a PDF file, then added the check box and date fields with the Acrobat Forms editor. I would prefer to use FormsCentral if it is possible.We now support multiple fields on one line. This post provides a brief overview.
Give it a try and send us your feedback.
Sorry it took so long.
Randy -
Inserting data from jsp form to multiple tables !
Hi,
I want to insert data from jsp form to two tables
tables are
(1) Form
formId (PK)
deptName
(2) Data
formId (FK)
sNo
description
itemCode
and the problem is that i want to save information form a jsp form to above two tables and i have only one form.
so how do i insert data from a jsp form to multiple tables.You already know what your form in the jsp will be and what fields they are. You also already know what your database looks like. Using one form, you should be able to break the data down, and give it certain ids and/or names, so that when the form is submitted, you retrieve the correct values corresponding to a specific field and insert it.
Unless there is something else I am not catching, this seems pretty straight forward. -
Hi APEX friends
I am working on a project where i have to create a form on report (creating on 1table is simpler ) , on multiple tables
one table has Primary key which is foreign key to many other table.
First i want to user to enter data to two main tables ( for ex , entering new employee (name , address etc ) and second would be employee health data ) after that only they can enter further details to other table ( ex HR table wages , pto etc. )
How can i make them insert in primary table and submit (insert ) on one button only !!
what approach i should use , (except wizard)?
pls help me in explore this issue.
Thanks
NsHi,
you can create a wizard with several pages:
page 1 for entering new employee (name , address etc )
page 2 for be employee health data
page 3 and further for the other data
If the user isn't filling in the right information in one of the wizard pages don't allow them to take a step further in the wizard.
Finally make a summary page and on that page you can insert the data from the previous wizard pages, based on the page items on those pages, into the tables.
regards,
Erik-jan -
How to create a form based on table using dynamic page?
Hi,
I need to create a form using dynamic page. How do you pass values from the html form to a oracle procedure that will get executed on submission of the form ? I could not find any documents which shows how to do that. Can anyone please help me out with an example ?
thanks,
MainakHi,
Something seems to get added to the form action because of "http". Hence I am removing it.
You need to write a procedure with the values in the as parameters. Say for example you want to insert a record into dept
table then
Dynamic page code
<html>
<body>
<form action="portalschema.insert_dept">
<input type="text" name="p_deptno">
<input type="text" name="p_dname">
<input type="submit" name="p_action" value="save">
</form>
</body>
</html>
Procedure code.
create or replace procedure insert_dept
(p_deptno in number,
p_dname in varchar2,
p_action in varchar2)
is begin
if p_action = 'save' then
insert into scott.dept(deptno,dname) values(p_deptno,p_dname);
commit;
end if;
end;
grant execute on insert_dept to public;
Hope this helps.
Thanks,
Sharmila -
How to create a form based on table@databaselink
I have created a database link under OracleXe to access an Oracle 9i and it works very well. I can manually access the tables that I like to see. Want to experiment to create a form under HTMLDB based on a table from another database that I have created DataLink to. When I go choose Create Application in HMTLDB and then select Form from page type under table or view I tried to do this tablename@databaselink but it seems it can not find the table this way. Any idea how to do this?
ThanksMike,
As I am trying to test and learn more about htmldb I was trying to get some data from oracle 9i to oracleXe, create some forms, reports and etc. At first I tried to use views and forgot to add the primary key, got the error so I posted the message on the board.
Then I did try out the long way creating tables with package and procedure and some other fun stuff to create an application which by the way it worked very well. Then I created some users and changed some password. When I tried again to run the application I start getting invalid login credentials. After many attempts finally I went home, as I was driving home I thought about something and at home I tried it.
I did some testing and noticed if I create a user under admin say userA+passwordA then login with userA+passwordA, create a table and then create an app base on that table and then run the app, with userA+passwordA I can login and app works perfectly. Then I logged out and as admin logged in, changed the userA password to passwordB. I logged out and logged in with userA+passwordB and then when I tried to run the app I get the invalid login credentials, when I change the passwordB to passwordA the app will works again. This is suppose to be this way!
Again thanks to all -
How to create a form on a table with 3 columns for a PK
Hi All,
We have a table that has 3 Columns that form the Primary Key and I would like to create a form based on that table; unfortuanately on the 'Create Form Page' there's only 2 options that identifies the first and second PK columns.
Is there a way I could add the third PK column.
Kind regards
MelMaybe this can help:
http://apex.oracle.com/pls/otn/f?p=31517:157
using instead of trigger on a view.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------- -
Problem creating a form on a table from another custom schema
Hi,
I have a table in a custom schema that i have granted SELECT, UPDATE, INSERT and DELETE to our apex schema. I have created a synonym for this table under the apex schema but I can't build a form for it. If i try adding the form when creating the application, it gives me an error about not having a primary key on the table, which i do. If i create the application with a blank page and then try to add the form, it gives me an error that the table must contain at least one column, which it contains 12. If i view the table in the SQL Workshop, it gives an accurate count of rows in the table but doesn't provide any information about the table and doesn't display the data.
If I login to TOAD under our apex schema and view the synonym object, i can see all of the information about the table - the columns, the primary key, etc. But I can't see it inside the Application Express app.
Can anyone tell me why this is and what i can do to build a form on this shared table?
Thanks,
TroyTroy,
I suggest you get rid of the synonym and then don't use the Create Application wizard for this purpose. Instead, create the application, then use a create page or create form wizard. It should first ask you for the name of the schema that contains the table. If you get that far, you should be on your way.
Scott -
Create object type from multiple tables for select statement
Hi there,
I have 3 tables as given below and I wish to create an object type to group selected columns as 'attribute' from multiple tables.
I need to create 2 input parameters to pass in - 'attribute' and 'attribute value' in PL/SQL and these 2 parameters will be
passing in with 'column name' and 'column value'. e.g. 'configuration' - the column name, 'eval' - the column value.
Then, the PL/SQL will execute the select statement with the column and column value provided to output the record.
Pls advise and thank you.
table ccitemnumber
name null type
ccitemnumber not null varchar2(20)
configuration varchar2(20)
item_type varchar2(30)
table productmodel
productmodelnumber not null varchar2(6)
description varchar2(60)
accesstimems number
numberofheads varchar2(2)
generation varchar2(10)
numberofdiscs varchar2(2)
factoryapplication varchar2(150)
table topmodel
stmodelnumber not null varchar2(30)
productfamily varchar2(60
formfactor varchar2(10)
modelheight varchar2(10)
formattedcapacity number
formattedcapacity_uom varchar2(20)
object type in database
configuration varchar2(20)
item_type varchar2(30)
numberofheads varchar2(2)
generation varchar2(10)
numberofdiscs varchar2(2)
factoryapplication varchar2(150)
modelheight varchar2(10)
formattedcapacity number
formattedcapacuser12043838 wrote:
Reason to do this as these fields are required to be grouped together as they are created in different tables. They are treated as 'attribute' (consists of many columns) of the part number. So, the PL/SQL is requested to design in a way able for user to pass in the column name and column value or part number, then the select statement should be able to query for the records. Another reason is a new column can be added easily without keep modifying those effected programs. Reuseable too.This basically equates to ... hard to code, hard to maintain, and poor performance.
Are you really sure you want to do this? This isn't going to be easy-street as you seem to think it is, but it's a one way street to a poorly performing system with security vulnerabilities (google SQL Injection).
I would highly recommend you reconsider your design decision here. -
Tabular form on multiple tables
Hi there,
I'm hoping to create a Tabular Form which is based on either a view or a join, whichever is easier.
We have two tables - Division and Targets. Division references Targets on target_id. The tables share a one-to-one relationship. I was originally told to simply merge the 36 fields in Targets to the Division table, however, we're likely going to have other tables (such as Department and Section) which also share a one-to-one relationship with Targets.
Is there a way to accomplish this with the Wizard, and if not, does anyone have any tutorials/advice on how to create PL/SQL to handle this?
Thanks,
AndrewMike
"Just for querying the data and making it appear in a single tabular form"
... hum so you would have to create a custom process anyway for the update - in which case, why have the view in the first place, there's no point.
>
What are the odds of moving the rows :P works for me anyways =P.
>
I'm not saying it's likely, but it can happen. As a developer you should take this into consideration when designing applications.
So
CREATE TABLE rowid_test
pk_col NUMBER PRIMARY KEY,
col1 NUMBER,
col2 VARCHAR2(6 CHAR)
TABLESPACE DAT_DATA;
CREATE SEQUENCE rowid_test_seq
START WITH 1
MAXVALUE 999999999999999999999999999
MINVALUE 1
NOCYCLE
CACHE 20
NOORDER;
BEGIN
FOR i IN 1 .. 150
LOOP
INSERT INTO rowid_test
(pk_col,
col1,
col2)
VALUES
(rowid_test_seq.nextval,
ROUND(DBMS_RANDOM.VALUE(0, 100000), 2),
DBMS_RANDOM.STRING('x', 6));
END LOOP;
COMMIT;
END;
CREATE OR REPLACE FORCE VIEW rowid_view AS
(SELECT rowid the_id, t.*
FROM rowid_test t);
SELECT *
FROM (SELECT /*+ FIRST_ROWS(n) */
a.*, ROWNUM rnum
FROM(SELECT *
FROM rowid_view
ORDER BY pk_col) a
WHERE ROWNUM <= 30)
WHERE rnum >= 15;
DELETE FROM rowid_test
WHERE pk_col = 17;
COMMIT;
INSERT INTO rowid_test
(pk_col,
col1,
col2)
VALUES
(17,
ROUND(DBMS_RANDOM.VALUE(0, 100000), 2),
DBMS_RANDOM.STRING('x', 6));
COMMIT;
SELECT *
FROM (SELECT /*+ FIRST_ROWS(n) */
a.*, ROWNUM rnum
FROM(SELECT *
FROM rowid_view
ORDER BY pk_col) a
WHERE ROWNUM <= 30)
WHERE rnum >= 15;So row 17 could have a different rowid in the tabular form to the table itself.
If the rowid is used to update then it could either not find the row or find a different row (ludicriously unlikely but you never know).
So the next option would be to combine it with a primary key - very safe but you may not always find your row. So why not just use the primary key? Well, in this case we have two tables involved so we do not have a single PK on which to base the update... So we'll have to write a custom update procedure as APEX will base it upon the primary key... so not having a primary key is no longer an issue.
Either way, your query is ambiguos
CREATE OR REPLACE VIEW "HIHI" AS
SELECT ROWID unique_rowid, d.Dep "Department", t.goal "Sales Goal"
FROM Division d, Target t
WHERE d.target_id = t.target_idWhich table is the rowid coming from??? This couldn't work.
Cheers
Ben
http://www.munkyben.wordpress.com
Don't forget to mark replies helpful or correct ;)
Edited by: Munky on Aug 28, 2009 10:53 AM -
Creating Dynamic Form based on table
I have to create 7-8 Form on a Table with Report.
Just wondering if there is a way, we can create this dynamically, so that I don't have to create this manually for each table.
Exp - I will have a table list, once I will select table_name from the LOV, then this will display the Report/Form region for that table...and so on...
thanks,
deepakHi Deepak,
So, basically, you want to be able to create an application without actually having to create it manually?
The nearest you could get, I think, is something like: Re: Creating Item dynamically and Automating tedious repetitive tasks / creating hundreds of different items (there may be other threads along these lines as well).
The principle is that you do pretty much what an Application Export/Import would do. I have to stress, though, that this is totally unsupported by Oracle and also most forum users, myself included, would not be able to help you!
Andy -
Hey,
I'm Pretty new to Access, as I've been given units to cover for my college course. Unfortunately my tutor has had this dumped on him too (so he's kinda self teaching as he goes as well)....
My issue is that I am trying to create a single form that will allow for all the information to be entered onto, which will then disseminate that info to the separate tables.
The database is a simple film database that has 8 tables in total. Seven are data tables (Filminfo; Certificate; Genre; Series; Role; Producer; Actor) and the seventh is a central table that is filled with keys as a connection for them all. Series is also
an off shoot from the filminfo table. I do have a pic, but I couldn't attach an image until my account was verified!
This is how we were advised to set it out and as far as I can tell the other parts that have been built are working. I know there is a way to do it, but tonight the internet is failing me, that, or my lack of understanding
exactly what I'm reading.
Therefore any help that could be offered by anybody that can work out what I'm rambling on about, would be most appreciated (even more so if in layman's terms)What you have in relational database terms is a 7-way many-to-many relationship type between the 'referenced' tables. This is what your eighth table is modelling by resolving the many-to-many relationship type into seven one-to-many relationship types.
The problem here is that you are going to end up with a huge amount of 'redundancy' in the table modelling the relationship type. At least some of the other tables represent entity types of which there can be more that one instance per film, e.g. there
will be more than one actor in most films. So let's say you record four actors for a film. That means four rows in the table, but you then have to record the producer of the film four times as well, entering the same foreign key value into all
four rows. That's what's meant by redundancy. Redundancy is a bad thing because it leaves the table open to the risk of 'update anomalies', e.g. two or more different producers could be inadvertently entered in different rows of the four.
Which is the correct one? There's no way of knowing.
So what relationship types do we really have here? Let's concentrate on films and actors. Each film can have many actors, and each actor can appear in many films (think Michael Caine!), so the relationship type is many-to-many. Now a many-to-many
relationship type cannot be modelled directly between two tables, it's done by a third table which resolves it into two one-to-many relationship types. So in broad outline the tables would be like this:
Films
....FilmID (PK)
....Title
....ReleaseDate
....etc
Actors
....ActorID (PK)
....FirstName
....LastName
....etc
and to model the relationship type:
FilmActors
....FilmID (FK)
....ActorID (FK)
....Role
The primary key of this last table is a composite one made up of the two foreign keys FilmID and ActorID.
Karl's already given you a clue how to represent this; by means of a form/subform. The form would be based on Films and the subform on FilmActors. For a simple example of this basic type of many-to-many relationship type and how to represent it
in a form/subform take a look at StuidentCourses.zip in my public databases folder at:
https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169
If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.
This little demo file illustrates a number of interfaces using forms, but just look at the conventional form/subform set-up. The other two are just there because from time to time people have asked how to do it in these other ways. Quite why they
want to is another matter!
My demo just has one subform, but there's no reason why you can't have multiple subforms in a films form of course, each for a different related entity type, each linked to the parent form on FilmID. Tip: to save space put ach subform on a separate
page of a tab control, with the main film data in the parent form above the tab control so it's visible permanently as you move between different pages of the tab control.
BTW in my StudentCourses demo try typing into the combo box in the subform the name of a new course not currently listed, French say, and see what happens. Take a look at the code in the combo box's NotInList event procedure to see how it works.
For other uses of this event procedure take a look at the NotInlist demo file in the same OneDrive folder.
I can sympathise with your tutor BTW. My next door neighbour is head of the art department at a high school, but she has to teach maths also!
PS: I included Role as column in the FilmActors table, but what about Alec Guinness in Kind Hearts and Coronets? (google it if you're not familiar with the film) How do you think you'd handle that situation?
Ken Sheridan, Stafford, England
Maybe you are looking for
-
Deleting Data from Infocube before loading
We are doing full loads by "Plan Version" into our CCA cube. We do these full loads each night. Eventually a "Plan Version" will stop changing and we can discontinue loading. My question is there a way we can delete data in the cube by "Plan Version"
-
Dear SDN Community, Can you please tell me how do I get the custom R/3 reports into MSS iviews. Do I need to customize anything in R/3 if I want to pull an existing R/3 report into portal. What are the MSS iViews that I should work here. I have no
-
Consignment pick-up should go to 'Q' status stock.
Hi All, Standard: When we do PGR for a consignment pick-up, the stock goes to unrestricted. I need: The stock should be registered as 'Q' stock. Now i am not talking about a QM function here since we are not using QM. Like for a normal return, we hav
-
I am new to iDVD and jere is the issue. I brought my movie in with 12 chapters in the "Revolution" theme. On the first page it has "Scenes 1-6" with just a simple link to that chapter. But when I go to the next page it has "Scenes 7-12" but with litt
-
I am working on a new install of JES 2005q4. We have 2 stores, db-prod-01 and db-prod-02. Users on db-prod-01 are working properly. db-prod-02 reports: Address list error -- 5.2.4 alias failed to expand to any valid addresses: [email protected] imsimta