Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: FORMS QUESTIONS

Re: FORMS QUESTIONS

From: Paul Dorsey <pdorsey_at_dulcian.com>
Date: Fri, 09 Jul 1999 02:40:51 GMT
Message-ID: <Tidh3.65904$eF3.16086@news.rdc1.nj.home.com>


Cute name.
answers below

--
Paul Dorsey
Dulcian, Inc.
www.dulcian.com
212 595 7223
Mastur Bates wrote in message <3784D4D6.A671D080_at_unet.univie.ac.at>...
>Hi !
>
>If you intend to reply to this message, please consider to reply by
>email to connecstasy_at_teleweb.at, because maybe I wont be able to read
>the newsgroups in the next days.
>
>I am porting a client/server application to ORACLE. As far as the data
>is concerned, it has been moved successfully from MS SQL to ORACLE
>Server.
>
>Now for the Client, which originally exists in Access95, there are some
>questions, and whether they are realisable with Oracle Forms.
>
>The client application's forms are all structured in the following way :
>
>Example :
>
>Form Customers :
>
>Name: Miller Andrew Address: 5th Avenue...
>
>What topic is the Customer interested in ? (Multiple Answers stored in
>detail table):
> 2 - Erotic Magazines
> 1 - Computer Science
> 5 - German Literature
>
>What profession has the Customer ? (Single Answer pulled from detail
>table holding the possible answers, stored into master table)
> 2 - Information Technology.
>
>
>The data structure is represented in the following tables :
>1) a "Customer" Table holding fields : Name, Address, and an integer
>field named "Profession", holding the key for the answer to "Profession"
>
>in the form above. In this case, the field holds the value 2.
>2) 2 Tables holding the answers for the single and the multiple answers
>questions in the form :
> Customer_Profession
> Customer_Interests
>3) 1 Table holding the multple answers for the Customer's interest :
>Customer_Interests_MultipleAnswers. In the above example, it would hold
>:
>Customer ID : 1227, AnswerID: 2
>Customer ID : 1227, AnswerID: 1
>Customer ID : 1227, AnswerID: 5
>
>
>Ok, here are the questions :
>A) in Access95, the "single answer" is represented by a combo box,
>holding the entries of the "Customer_Profession" table:
> but : there is no autocompletion in Oracle Forms ! And :
> how do I tell Forms to DISPLAY the NAME of the
> profession, but to store the NUMBER associated with it in
> the Customers Form ?

You can use a pop list.
I do this with two fields, one displayed and the other hidden. I populate them with an LOV. I use a view to display the non base table field.

>
>B) In Access, the multiple answer section is represented by a subform.
>When Clicking on it, a Multiselection-enabled List Box pops up, showing
>which answers have already been selected. and the User can select and
>deselect answers. Acknowledging his selection, the selection is
>represented in the subform.
>Now : there is no multiselection List Box in Forms, or do you know
>better ?

You can build your own with a generic block. We made it part of our template.

>
>C) in Access, the whole data structure is mirrored locally while
>operating on it. So when the User has selected his answers, and inserted
>
>them into the table "Customer_Interests_Multiple_Answers", this change
>hasnt yet been made on the server, and he can still cancel all he has
>done, by simply chosing NOT to copy the local data structure to the
>server.
>The Question is : how can I solve this in Oracle ? I thought of chosing
>a pop-up form (one that pops up so that the user is NOT able to select
>any other form while this one is showing up) for selecting the answers,
>and then, having the user click "OK", closing the pop-up form. and
>inserting the answers into the detail-section for the multiple answers
>in the Customer Form.
>But : what is the transaction structure then, when I chose to make a
>COMMIT_FORM on "Customers" ? Will I be able to roll back the insertion
>of the multiple answers on the server when the user finally choses NOT
>to make his updates on this Customer Record ?

One you commit, you commit. You can post and then rollback. Everything stays client side until you post or commit.

>D) when updating an entry, the table is locked only at the row level,
>but what about the detail table Customer_Interests_MultipleAnswers ?
>When INSERTING new answers, will the whole table be locked until the
>user commits his update on the master form "Customers" ? This would be
>unacceptable since other users wouldn't be able to update any of their
>customers then.
>

No, Oracle would not do a full table lock.

>E) same questions arise when not UPDATING a record, but INSERTING a NEW
>record on the Customer Form. Will the tables then all be locked for
>other users ? Imagine a User is editing the entry of a new Customer, and
>
>then choses some the Customer's interests by inserting records in the
>table "Customer_Interests_MultipleAnswers".
>Which tables will be locked and in which way will they be locked until
>the user choses to commit ?
>

No table locks would be required by anything you mention. However, if you have a bad database design and do not index your foreign keys then the reference tables get locked during the transaction. But you never have that problem if index your FKs (which is standard).

>F) how do I make such a "pop-up" form ?

I'm not sure I understand the question.

>G) is it possible to run multiple "Forms" Clients on the same host for
>testing multi-user access and for detecting multi-user locking conflicts
>

Yes. No problem.

>?
>H) I have auto-incremented Primary Keys in some of the tables.
>When migrating from SQL Server to Oracle, there qere automatic triggers
>and sequences created for that purpose. But how come the incremented ID
>doesnt show up when I chose to insert a new record in Forms on such a
>table ? Instead it asks me to enter it manually...

I assume you mean a sequence. You have several alternatives: 1) Populate the is with a trigger on the DB (usually a bad idea if you have complex forms that may need the ID prior to insertion). 2) use sequence nextval as the initial value for the id field in the form. This will burn a lot of numbers unnecessarily as forms pulls the nextval every time a new record is touched (even if nothing is ever entered. 3) Populate the item using a pre_insert trigger. We usually use this method.
>
>Well that are really all questions I have and I don't suppose most of
>them to be answered in this group, but anyhow, thanks in advance,

well, weren't you surprised.

>
>Jubin Zawar
>
>
>
>
Received on Thu Jul 08 1999 - 21:40:51 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US