Subquery in IF statement in trigger, without using foreign keys

Hello,
I'm investigating ways of writing a subquery in an IF statement, which is placed inside a trigger.
I wanna write smth like IF (:new.jazz not in (select goldies from T where ... )) etc. I don't know whether the fact that the IF is in a trigger adds some additional restrictions. (Does it?)
So far I found the solution described here: SubQuery Comparison in If Statement which I find a bit tacky, I could have the 'cooleststarinthegalaxy' instead of 1 and seems you need to do extra light, but still extra lifting.
I also read about the possibility of using MERGE, which I'm currently researching.
Is there any other way?
Thanks
Edited by: BluShadow on 14-Nov-2012 13:37
fixed link
Edite by me: the question is how (if possible) to do this without a foreign key.
Edited by: questioningq12 on Nov 14, 2012 6:11 AM
Edited by: questioningq12 on Nov 14, 2012 6:13 AM

Hi,
questioningq12 wrote:
Say I have tables A(namea varchar(10)), B(nameb varchar(10)), and B contains tuples ('1stname','2ndname').
I wrote a trigger before insertion, for each row, on table A. For a tuple t to be inserted, it should check whether t.namea is in the set of values nameb from B.
E.g., INSERT INTO A VALUES('1stname') should work. But INSERT INTO A VALUES ('3rdname') should fail. You can use a foreign key constraint for that.
If the tables already exist, and b.nameb is declared as UNIQUE (or PRIMARY KEY), then you can say:
ALTER TABLE  a
    ADD CONSTRAINT     a_namea_fk
    FOREIGN KEY  (namea)
    REFERENCES b (nameb)
;If you had a situation where you really needed to query a table in PL/SQL, and you weren't sure if the query would find anything, you could put the query in its own BEGIN ... EXCEPTION block, and test for NO_DATA_FOUND.
If you're just checking to see if a row exists or not, you can always write a query that is guaranteed to return exactly 1 row, like this:
BEGIN
    SELECT  COUNT (*)
    INTO    x
    FROM    b
    WHERE   nameb = :NEW.namea
    AND         ROWNUM  = 1;
    IF x = 0
    THEN  
        ...        -- print msgs, raise exceptions etc
    END IF;
END;Edited by: Frank Kulash on Nov 14, 2012 9:22 AM
Added example

Similar Messages

  • Nextval from trigger without using DUAL

    Hi everyone,
    It is possible to obtain the nextval of a sequence from a trigger without using DUAL?
    I have a table (TABLE1) with column ID NUMBER(10).
    I have a sequence (SEQ1)
    I need a trigger on before insert TABLE1 and I need obtain the nexval of the sequence BUT I CAN NOT use DUAL (it is forbbiden in my project. Don't ask :((( )
    can you help me?
    thanx a lot!

    "So of course using select seq.nextval from dual is
    most of the time unnecessary thing and should be
    banned as much as possible, but I think that simple
    prohibition is quite stupid."
    why do you think using dual ist most of the time
    unnecessary?Because in most scenarious you won't need dual.
    What are the reasons for using dual?
    1) because you need the value later in some other computations. The most elegant, simple and performant solution is just use returning clause of the insert statement.
    2) because the value is not provided. As I'm usually using more or less logic in DB or at least some business logic API (as pl/sql packages/procs) I'm always inserting new rows using sequence.nextval in the very insert statement so absolutely no need for before insert trigger supplying id value.
    If you think that select sysdate/sequence.nextval and similar things are very cheap then it is not true :)
    I've seen some batch procedures processing many rows and for each row:
    1) get sequence.nextval into variable from dual
    2) insert row using variable in id
    And select seq.nextval from dual took more tha 10% of overall time.
    Ok just a simple test case on 9i
    declare
    val number;
    begin
      for i in 1..10000 loop
        select seq1.nextval into val from dual;
        insert into seq2 values (val);
      end loop;
    end;dbms_profiler shows that total time for select into was ~982 msec but insert just took 722 msec. So actual insert took less than select from dual! The overall time was 1.922 secs.
    OK now let's see how it is with following script:
    declare
    val number;
    begin
      for i in 1..10000 loop
        insert into seq2 values (seq1.nextval) returning a into val;
      end loop;
    end;insert row took 931 msec and overall time was 1.094 secs.
    So this is for batch. For OLTP like app the only difference is that resource waste is spread out for many transactions but the overall net result is the same - you are inefficiently wasting resources.
    Ok in 10g results will be better with fast dual, but select anything from dual is very bad habit especially if used extensively.
    Gints Plivna
    http://www.gplivna.eu

  • Data fetch from table without Refresh and without using tab key.

    hi Friends,
    I have a problem i want to extract data from table without Refresh into text field without using Tab key. when i'll enter any value in a text field then corressponding value should come in to corressponding textfield without using Tab Key.
    eg. when i enter emp_id 101 in a text field then the first_name and last_name ,adress should come in to corressponding text fields without refresh and without using Tab key.
    How Can I do this.
    Thanks
    Manoj

    Hi Manoj,
    I assume that this is similar to: Data fetch without Refresh rather than Re: Value of one textfield should come into another textfield Without Using TAB ?
    If so, the only change you need to make on the first one is to use "onkeyup" instead of "onchange" in the item's "HTML Form Element Attributes" setting.
    Note, however, that the user must move away from the item at some point (for example, to click a button), so the onchange will be triggered anyway.
    Andy

  • ABAP WD, Multiple Row selection in table control without using Crtl key

    Hi all,
    I am displaying the records using the table control, i have to select the multiple records in the list <b>without using Crtl key</b>.
    How do i solve this?
    Thanks

    Hi,
    you should set the table parameter selectionMode to multi or multinolead
    than you can select multiple records,
    these you can retrieve: lt_selected_elements = node->get_selected_elements( ).
    also see this <a href="https://forums.sdn.sap.com/click.jspa?searchID=4209200&messageID=3544158">thread</a> for info
    grtz,
    Koen

  • Not use foreign keys.

    I would like to know if is it bad if I don't want to use foreign keys? is it just a constraint? Is it useful? If I wont use delete on cascade for example is it mandatory to use foreign keys? Please help me with this doubt.
    Thanks.

    A Small example:
    DROP TABLE T_TABLES ;
    CREATE TABLE T_TABLES AS
    SELECT ROWNUM AS ID, OWNER, TABLE_NAME
    FROM   ALL_TABLES;
    ALTER TABLE T_TABLES ADD CONSTRAINTS PK_TABLES PRIMARY KEY(ID);
    DROP TABLE T_TABLE_COLUMNS ;
    CREATE TABLE T_TABLE_COLUMNS AS
      SELECT T.ID, TC.OWNER, TC.TABLE_NAME, TC.COLUMN_NAME, TC.DATA_TYPE
      FROM   ALL_TAB_COLS TC
               JOIN T_TABLES T ON (T.OWNER = TC.OWNER AND T.TABLE_NAME = TC.TABLE_NAME)
      WHERE  T.TABLE_NAME NOT IN ('T_TABLES', 'T_TABLE_COLUMNS'); -- EXCEPT THESE TWO TABLES
    EXPLAIN PLAN FOR
    SELECT *
    FROM   T_TABLE_COLUMNS
    WHERE  ID IN (SELECT ID FROM T_TABLES);
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
    | Id  | Operation          | Name            | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |                 | 27823 |  3586K|    63   (7)| 00:00:01 |
    |   1 |  NESTED LOOPS      |                 | 27823 |  3586K|    63   (7)| 00:00:01 |
    |   2 |   TABLE ACCESS FULL| T_TABLE_COLUMNS | 27823 |  3233K|    60   (2)| 00:00:01 |
    |*  3 |   INDEX UNIQUE SCAN| PK_TABLES       |     1 |    13 |     0   (0)| 00:00:01 |
    --ADD FOREIGN KEY
    ALTER TABLE T_TABLE_COLUMNS ADD CONSTRAINT FK_TABLES FOREIGN KEY(ID) REFERENCES T_TABLES(ID);
    -- SAME QUERY AGAIN
    EXPLAIN PLAN FOR
    SELECT *
    FROM   T_TABLE_COLUMNS
    WHERE  ID IN (SELECT ID FROM T_TABLES);
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
    -- NO JOIN ANYMORE
    | Id  | Operation         | Name            | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |                 | 27823 |  3233K|    60   (2)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| T_TABLE_COLUMNS | 27823 |  3233K|    60   (2)| 00:00:01 |
    -------------------------------------------------------------------------------------FKs can even save you from joins.

  • SUS ASN/POR without using confirmation key in ECC

    hi gurus,
    would like to verify if to use SUS ASN or POR without having confirmation key in ECC is possible?
    we are on MM-SUS scenario (ECC6 & SRM7).
    thanks,
    gg

    Hi
    ASN is controlled thorugh Confirmation Control Key in ECC PO.
    For POR you dont need this key....
    Regards
    Virender Singh

  • How to trigger button using shortcut keys

    Hi Friends i want to trigger a button in java swings using keyboard keys.
    for ex: a button called "Enter" either i click mouse or i press ALT+E to trigger it.
    Plz give me sample coding if u have
    By
    vinod

    Try looking at the tutorials...
    http://java.sun.com/docs/books/tutorial/uiswing/events/keylistener.html

  • Using FOreign key constraints on tables in database.

    I am student and novice in the field of ORACLE and PL/SQL and Database Creation. I had created a database consisting tables and got problem while applying foreign key constraints.
    CUST_MSTR
    CREATE TABLE "DBA_BANKSYS"."CUST_MSTR"("CUST_NO" VARCHAR2(10),
    "FNAME" VARCHAR2(25), "MNAME" VARCHAR2(25), "LNAME" VARCHAR2(25),
    "DOB_INC" DATE NOT NULL,      "OCCUP" VARCHAR2(25), "PHOTOGRAPH" VARCHAR2(25),
    "SIGNATURE" VARCHAR2(25), "PANCOPY" VARCHAR2(1),      "FORM60" VARCHAR2(1));
    (CUST_NO is PRIMARY KEY, )
    -- EMP_MSTR
    CREATE TABLE "DBA_BANKSYS"."EMP_MSTR"("EMP_NO" VARCHAR2(10),
    "BRANCH_NO" VARCHAR2(10), "FNAME" VARCHAR2(25), "MNAME" VARCHAR2(25),
    "LNAME" VARCHAR2(25), "DEPT" VARCHAR2(30), "DESIG" VARCHAR2(30));
    (EMP_NO is primary key )
    --NOMINEE_MSTR
    CREATE TABLE "DBA_BANKSYS"."NOMINEE_MSTR"("NOMINEE_NO" VARCHAR2(10),
    "ACCT_FD_NO" VARCHAR2(10), "NAME" VARCHAR2(75), "DOB" DATE,
    RELATIONSHIP" VARCHAR2(25));
    (NOMINEE_NO is primary key )
    --ADDR_DTLS
    CREATE TABLE "DBA_BANKSYS"."ADDR_DTLS"("ADDR_NO" NUMBER(6),
    "CODE_NO" VARCHAR2(10),      "ADDR_TYPE" VARCHAR2(1), "ADDR1" VARCHAR2(50),
    "ADDR2" VARCHAR2(50), "CITY" VARCHAR2(25), "STATE" VARCHAR2(25),
    "PINCODE" VARCHAR2(6));
    ( ADDR_NO is primary key )
    Problem: I want to apply foreign key constraints on ADDR_DTLS table so that Before inserting value in ADDR_DTLS table it must check, VALUE in ADDR_DTLS.CODE_NO must be PRESENT either in attribute value CUST_MSTR.CODE_NO or EMP_MSTR.CODE_NO or NOMINEE_MSTR.CODE_NO table .
    I applied the foreign key constraints using this syntax
    CREATE TABLE "DBA_BANKSYS"."ADDR_DTLS"("ADDR_NO" NUMBER(6),
    "CODE_NO" VARCHAR2(10),      "ADDR_TYPE" VARCHAR2(1), "ADDR1" VARCHAR2(50),
    "ADDR2" VARCHAR2(50), "CITY" VARCHAR2(25), "STATE" VARCHAR2(25),
    "PINCODE" VARCHAR2(6),
    constraints fk_add foreign key CODE_NO references CUST_MSTR. CODE_NO,
    constraints fk_add1 foreign key CODE_NO references EMP_MSTR. CODE_NO,
    constraints fk_add2 foreign key CODE_NO references NOMINEE_MSTR.CODE_NO);
    (foreign key)
    ADDR_DTLS.CODE_NO ->CUST_MSTR.CUST_NO
    ADDR_DTLS.CODE_NO ->NOMINEE_MSTR.NOMINEE_NO
    ADDR_DTLS.CODE_NO ->BRANCH_MSTR.BRANCH_NO
    ADDR_DTLS.CODE_NO ->EMP_MSTR.EMP_NO
    When I applied foreign key constraints this way, its gives a error called foreign key constraints violation. (I understand that, its searches the attribute value of ADDR_DTLS.CODE_NO in all the three tables must be present then the value will be inserted. But I want, if the value is in any of the three table then its should insert the value or its gives an error.)
    Please help me out, though i put the question and i want too know how to apply the forign key in this way. and is there any other option if foreign key implementation is not pssible.

    If you are on 11g you can use ON DELETE SET NULL:
    CREATE TABLE addr_dtls
    ( addr_no          NUMBER(6)  CONSTRAINT addr_pk PRIMARY KEY
    , addr_cust_no     CONSTRAINT addr_cust_fk    REFERENCES cust_mstr    ON DELETE SET NULL
    , addr_emp_no      CONSTRAINT addr_emp_fk     REFERENCES emp_mstr     ON DELETE SET NULL
    , addr_nominee_no  CONSTRAINT addr_nominee_fk REFERENCES nominee_mstr ON DELETE SET NULL
    , addr_type        VARCHAR2(1)
    , addr1            VARCHAR2(50)
    , addr2            VARCHAR2(50)
    , city             VARCHAR2(25)
    , state            VARCHAR2(25)
    , pincode          VARCHAR2(6) );In earlier versions you'll need to code some application logic to do something similar when a parent row is deleted, as otherwise the only options are to delete the dependent rows or raise an error.
    btw table names can be up to 30 characters and don't need to end with MSTR or DTLS, so for example CUSTOMERS and ADDRESSES might be more readable than CUST_MSTR and ADDR_DTLS. Also if the Customer/Employee/Nominee PKs are generated from a sequence they should be numeric.
    Edited by: William Robertson on Aug 15, 2010 6:47 PM

  • How to fetch column data using foreign key in adf table ?

    I have created a adf table using a view that has a group id and user id column. I want to display the user name ( from user table) and group name from group table. I had created view links to the corresponding tables from the user_group view ( whose iterator is used to render the table).
    It sort of works. I dragged the user name from the embedded user iterator in user_group iterator. It does find the correct user name but if I have more than one row, it displays the user name of the last row user in all rows !
    Is there a solution to this problem ?

    Well, I saw in the view query for the association view ( for Many-Many) that the SQL already had the joins with the two ( master) tables to the association table. So I went ahead and added the descriptive columns to the select clause. Then the selected columns showed up in the attribute list by themselves ( without my intervention). So far so good.
    Then I recreated the adf table attribute by dragging these newly selected attribute to the page. I still see that the value of the attribute is the same in all the rows - this time it is the value for the FIRST row. It doesn't correspond to the foreign key for that particular row.
    IS THIS A BUG ? Has anyone else ever done this ?

  • Binding for table produces list for other tables using foreign key and crea

    Using
    software Jdev 11G, WLS 11G, Oracle DB 11G, Windows Vista platform
    technology EJB 3.0, jspx, backing beans, session bean
    I cannot create a namedquery on my secondary table. The method for the column uses the entity object rather than the name and value of the column.
    For instance,
    (Coketruck) table has inventory records(Products) table
    Coketruck has one to many to the Products table
    Products has a many to one to the Coketruck
    I need to return the products from the product table based on the CokeTruck but I cannot create a namedQuery because the method in the Product table is an entity object type instead of a long that I can use to look up all the products based off the column truck_id.
    This is what I was expecting…
    Private Long truckId;
    public Long getTruckId() {
    return truckId;
    public void setTruckId (Long truckId) {
    this. truckId = truckId;
    Instead this is what I have…
    @ManyToOne
    @JoinColumn(name = "TRUCK_ID")
    private Coketruck coketruck;
    this. coketruck = coketruck
    public Coketruck getCoketruck() {
    return coketruck;
    public void set Coketruck (Coketruck coketruck) {
    this. coketruck = coketruck;
    How do I do a query on the Product table to return all the products that are in the coketruck?
    If I do the following it expects for me to pass the Entity Object which I cannot use as search criteria for my find method.
    @NamedQuery(name = "Products.findById", query = "select o from Products o where o.truckId = :truckId")
    On a different note but the same song…
    I noticed that when I look at my Session Bean Data Contols that the coketruck already has a list of the products. I have created a jsp page with a backing bean and have been able to use the namedquery on the coketruck entity to retrieve the productList. Unfortunately I need to sort the products by type and was also not able to find where to perform the work to be able to iterate through the productList to get my desired display. Therefore I started looking at doing another namedquery that would only retrieve the product_type ordering by the truckId.
    Seems I have come full circle… I don’t care what method I have to use to get the info back.
    Any help is greatly appreciated!

    user9005175 wrote:
    Hi!
    I work on an application wich uses a shopping cart stored in a database. The shopping cart uses two tables:
    CART: Holds information common for one shopping cart: the user it is connected to etc.
    - Primary key: CART_ID
    CART_ROW: One row in the cart, e.g. one new product to buy.
    - Primary key: ROW_ID
    - Foreign key: CART_ROW.CART_ID references CART.CART_ID
    From the code the rows in the cart are collected per cart, as is modelled by the foreign key. There exists one more relationship, which we use in the code, but which is not modelled by a foreign key in the database. One row can be dependent on another row, which makes the other row a parent.
    CART_ROW has a column PARENT_ID which references CART_ROW.ROW_ID.
    Should we add a foreign key for PARENT_ID? Or are there any questions to consider when it is a foreign key to the same table?
    I suggest to add foreign key it wont harm the performance (except while on insert when there would be validation for the foreign key). But it would prevent users to insert wrong/corrupt data either through code or directly by loggin in the database.
    A while ago we added indexes, both on ROW_ID and on PARENT_ID. Could the index on PARENT_ID have been harmful, since there is no foreign key?
    Index on parent_id would only be harmful if you do not make use of index after creating it (i.e. there is no query which make use of this index).
    And if you decide to have a foreign key on parent_id then I suggest to have index too on parent_id as it would be helpful atleast when you delete any record in this table.
    Best regards!

  • Drop partition without disabling foreign key

    Hi All,
    I have parent and child table.
    Parent table
    create table parent_1
    (id number,
    create_date date,
    constraint parent_1_pk001 PRIMARY KEY (id))
    PARTITION BY RANGE (create_date)
    INTERVAL (NUMTODSINTERVAL(1,'DAY'))
    (PARTITION parent_1_part VALUES LESS THAN ('01-JAN-2010'));
    Child Table
    create table child_1
    (id number,
    create_date date,
    constraint child_1_fk001 FOREIGN KEY (id)
    REFERENCES parent_1 (id))
    PARTITION BY RANGE (create_date)
    INTERVAL (NUMTODSINTERVAL(1,'DAY'))
    (PARTITION create_date_part VALUES LESS THAN ('01-JAN-2010'));
    I am having problems dropping partition.
    Parent_1
    1     26-JUL-12
    2     26-JUL-12
    Child_1
    1     26-JUL-12
    alter table CHILD_1 drop partition SYS_P274;
    table CHILD_1 altered.
    ON DROPPING PARENT PARTITION
    alter table parent_1 drop partition SYS_P273;
    Error report:
    SQL Error: ORA-02266: unique/primary keys in table referenced by enabled foreign keys
    02266. 00000 - "unique/primary keys in table referenced by enabled foreign keys"
    *Cause:    An attempt was made to truncate a table with unique or
    primary keys referenced by foreign keys enabled in another table.
    Other operations not allowed are dropping/truncating a partition of a
    partitioned table or an ALTER TABLE EXCHANGE PARTITION.
    *Action:   Before performing the above operations the table, disable the
    foreign key constraints in other tables. You can see what
    constraints are referencing a table by issuing the following
    command:
    SELECT * FROM USER_CONSTRAINTS WHERE TABLE_NAME = "tabnam";
    PLEASE CAN I KNOW IF THERE IS ANY WAY TO DROP PARENT PARTITION WITHOUT DISABLE/ENABLE FOREIGN CONSTRAINTS
    Thanks

    SQL Error: ORA-02266: unique/primary keys in table referenced by enabled foreign keys
    02266. 00000 - "unique/primary keys in table referenced by enabled foreign keys"
    *Cause: An attempt was made to truncate a table with unique or
    primary keys referenced by foreign keys enabled in another table.
    Other operations not allowed are dropping/truncating a partition of a
    partitioned table or an ALTER TABLE EXCHANGE PARTITION.
    *Action: Before performing the above operations the table, disable the
    foreign key constraints in other tables. You can't do that until you disable the foreign key constraint
    http://jonathanlewis.wordpress.com/2006/12/10/drop-parent-partition/
    Hope this helps
    Mohamed Houri
    www.hourim.wordpress.com

  • How we relate two tables using foreign key(fk)?

    hi to all,
        what are the conditions has to follow to relate two tables.I.e.,
    the two tables have same primary keys(pk). if we relate these two tables in one table the pk and fk will be the same then how that table in active.

    Hi
    To relate two tables..we have foreign key relationship.
    In one table v have primary key and in the second table, the same key is foreign key for that table..
    To relate two tables, we can use JOINS
    If there is already a suitable foreign key between two tables used in the view, these tables can be linked with a join condition from this foreign key.
    Create a view on tables TAB1 and TAB2. TAB1 is the primary table of the view. TAB2 is the secondary table of the view. TAB1 is the check table for TAB2. The foreign key fields are assigned to the check table fields as follows:
    TAB1-FIELD_A assigned to TAB2-FIELD_1
    TAB1-FIELD_A assigned to TAB2-FIELD_1
    The join condition of the view generated from the foreign key is then:
    CREATE VIEW ... AS SELECT ... WHERE TAB2-FIELD_1 = TAB1-FIELD_A AND TAB2-FIELD_2 = TAB1-FIELD_B.
    Join conditions can also be copied from generic and constant foreign keys. If a constant is assigned to a field in the foreign key, it is also assigned to the field in the join condition. There is no join condition for a generic relationship in the foreign key.
    The foreign key between tables TAB1 (check table) and TAB2 (foreign key table) is defined as follows:
    TAB1-FIELD_A assigned to TAB2-FIELD_1
    TAB1-FIELD_B generic
    TAB1-FIELD_C assigned to constant ‘C’
    The join condition for the view generated from the foreign key is in this case:
    CREATE VIEW ... AS SELECT ... WHERE TAB2-FIELD_1 = TAB1-FIELD_A AND TAB2-FIELD_2 = ‘C’.
    Hope it helps
    Reward if useful.

  • Creating Column in table or use Foreign Key

    I have a bunch of tables that are year specific, so I need to store the year in the record. I'm not sure if I should create a column in each table called 'year' or create a master 'Year' table and use a foreign key to it in all my other tables. Any advice?
    PK_ID NUMBER Constraint pk1
    PRIMARY KEY
    YEAR VARCHAR2(4)
    --- or----
    PK_ID NUMBER Constraint pk1
    PRIMARY KEY
    FK_YEAR NUMBER Constraint fk_year
    REFERENCES year_table(PK_ID)

    Does your "year" entity have any attributes ?
    Why do you have a year, which to most people seems to be a number, stored as a varchar2(4) ? And what are you going to do about the Y10K problem ?
    How about making the ID of year the numeric value of the year you are storing - then you have eat your cake and have it ;)
    Seriously, though, why do you want a table to say that the year 2008 is the year identified by a meaningless unique number ?
    Regards
    Jonathan Lewis
    http:/jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk

  • CDR-21605, but not without a foreign key

    Hello All,
    I am working with Designer 9.0.2.96.6 and generating some forms that were proted from a previous designer version. Most of the forms are ok, but some are not.
    They give the following error:
    Message
    CDR-21605: Failed while processing Module F_CF_COD in function cfbbsa() :671 BOF cfbbs
    Cause
    The generator failed due to an unexpected error - the
    error indicates the object the generator was processing
    when it failed.
    Action
    These forms use two tables that are joined using a foreign key.
    I have created a copy of the form and it didn't work either. Then when I disabled the foreign key that is used in the table, and regenerate the form, it works ok.
    The problem is that the foreign key is used to get referential integrity.
    Does anyone have any idea or direction to solve this problem?
    Mark

    Are we generating Master-Detail Form or Base Table with lookup form? Please give more details, such as the schema definition, the Module Data Diagram, i.e. which is the base table, which is the reference table.
    For Master-Detail table, you need to define the Context value of the master table in order to populate the values of the detail table in the detail block of the generated form.

  • T410: How to turn on thinklight without use pgup key

    Dear all!
    I am using Thinkpad T410, my keyboard is broken a key as "Pgup". Now when I want to turn on off the Thinklight, I can't use FN+Pgup. I think there is some other ways to turn on off the Thinklight without Pgup key.
    Please help me for this case!
    Thanks a lot!

    As far as I know there is no current Windows software utility to control the ThinkLight.
    This earlier thread may provide some insights, ThinkLight - programmatic control as may this Python script for Windows to control ThinkPad features.
    Note however that the software and scripts mentioned in them do not work with current Windows versions.
    Cheers... Dorian Hausman
    X1C2, TPT2, T430s, SL500, X61s, T60p, A21p, 770, 760ED... 5160, 5150... S360/30

Maybe you are looking for

  • Mapping links wont work in Opera and IE but do work in Safari.

    Hi, What can I do to fix the code below? The links wont work in IE and Opera, but OK in safari. The error message is: in tag: map the following required attributes are missing: id[XHTML 1.0 Transitional] Code <div id="mainContentLeft1b"> <div id="mai

  • PDF Document requests a password for opening despite not setting it up to do so

    I created a secure pdf document that is to be downloaded from a web site. Upon downloading, users should be able to open/view the pdf without having to enter a password, but would need a password to be able to edit or make changes to the document. Wh

  • Problem signing in Metalink

    I have a metalink account and want to sign in to it, but the sign in page keep appear after I press of "Sign In" button. Is there anyone can tell me how to solve this problem? Thanks

  • Failed to export to excel

    Hi, I am trying to export a 1,013 KB file to excel, and keep getting the error message 'failed to export to excel - encountered an unexpected problem'  Is there any way to see what the problem is, and how to resolve it? LizP

  • Can anybody explain me transaction RSRV

    Hi, Please explain me about RSRV I know it is used for repairing BW OBJECTS In that we have elementary and combined tests so kindly explain all the functionalities which r there in elementary and combined tests. I will assign points. Thanks in advanc