Getting a bad bind variable error while compiling a custom form in R12

Hi,
I am getting a bad bind variable error while compiling a custom form.
I tried setting the forms_path variable and I am still getting the error. Can anyone please suggest what can be done?
DECLARE
BEGIN
IF :parameter.p_line_ship_to = 'T'
THEN
IF :SYSTEM.cursor_item = 'LINE.SHIP_TO'
THEN
:parameter.lov_num_param1 := :line.ship_to_customer_id;
oe_lines.ship_to ('WHEN-VALIDATE-ITEM');
:parameter.lov_num_param1 := :line.ship_to_customer_id;
END IF;
:parameter.p_line_ship_to := 'F';
END IF;
END;
I am getting this error:
Bad bind variable 'parameter.p_line_ship_to'

The Parameter is not defined in the form.. But, this form is already been compiled and deployed.. I have to make some changes to the form and tried to compile it, when i am getting this error. Is it possible that the parameter would be defined in some other form or can this error be due to some other reasons?
Thanks in Advance.

Similar Messages

  • Bad bind variable error

    Hi all,
    I have this code in a PB trigger:
    declare
    v_alert_button number;     
    invalid BOOLEAN;
    CURSOR C_REFNO_SEARCH IS
    SELECT * FROM REFNO_LIB.REFNO_02000_IDENT
    WHERE CAGECDXH = :CONTROL.C_CAGECDXH AND
    REFNUMHA = :CONTROL.C_REFNUMHA;
    BEGIN
    OPEN C_REFNO_SEARCH;
    FETCH C_REFNO_SEARCH INTO :REFNO_02000_IDENT;
    invalid := C_REFNO_SEARCH%NOTFOUND;
    IF invalid then
    V_ALERT_BUTTON := SHOW_ALERT('REFNUM_NOT_FOUND');
    END IF;
    CLOSE C_REFNO_SEARCH;
    REDISPLAY;
    END;          
    I can't compile this trigger code cleanly. I get a error on the FETCH statment pointing to ":REFNO_02000_IDENT" as a bad bind variable. I'm trying to populate the ":REFNO_02000-IDENT" data block without having to key in over 50 items that are in the block.
    Any help is appreciated.
    Thanks

    It's not possible what you want. I guess you have to key in the items. Forms tries to find the item :REFNO_02000_IDENT and can't find it becuase it doesn't exist. Thats why you get bad bind variable.

  • 'Error 49 bad bind variable' error message.

    When I copied a form that has been working from our Linux server to my PC and compiled it, I received many error messages like this in several procedures, functions and triggers:
    “Error 49 at line 69, column 10, bad bind variable ‘edit_Dealer.corporation’
    Does anybody know why this is? As I said, the app works for the end user from the Linux server.
    Thank You.

    Does the form you copied have any attached libraries or subclassed objects? If so, did you copy the Library and Object source files to your PC as well? If you copied these supporting files already, are they in a directory location that is part of your FORMS_PATH?
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Bad bind variable error on creating trigger

    hi
    im trying to create a trigger on a table in Oracle and I keep gettin this error:
    PLS-00049: bad bind variable 'NEW.ID'
    TeamID is a primary Key, it creates the sequence fine, but i get the error on the create trigger,
    CREATE TABLE TBLTEAMS
    TEAMID NUMBER(5),
    NAME VARCHAR2(50 BYTE),
    MANAGER VARCHAR2(50 BYTE),
    COSTCENTRE NUMBER(9),
    PARENTTEAMID NUMBER(5)
    create sequence seq_Teamsautonumber;
    create trigger trg_Teamsautonumber
    before insert on tblteams
    for each row
    begin
    select seq_Teamsautonumber.nextval into :new.id from dual;
    end;
    any ideas?

    You have said
    :new.idthat means you are trying to load the sequence value into a column that doesn't exist in your table.
    you would need to use
    :new.teamidAssuming you are trying to auto-populate the TEAMID column on your table.

  • CG$CTRL Bad Bind Variable error Migrating from Forms 4.5 to Forms 6

    Hi All,
    I have an old application deployed using Forms 4.5 runtime that I would like to migrate to the latest version of Forms.
    My intended migration path was Forms 4.5 -> Forms 6i -> Forms 10g.
    After successfully converting the source 4.5 .pll library files to Forms 6i by opening the files in the Forms 6i Forms Builder (6.0.8.25) and then saving the library files in the FORMS60_PATH I now encounter the following error that is hindering the migration process:
    Error 49 at line 6, column 3
    bad bind variable 'CG$CTRL.SE_CODE'
    I have read some other posts that mention Headstart Templates. Does anyone know if these CG$xxxx program units are part of Headstart? And if so, how can I get the Template files?
    Thanks in advance,
    Gary.

    CG$CTRL are cerated when the forms are developed using the designer...
    Oracle Forms requires that every item in a form must belong to a block, but these generated non-base table items are not associated with any module component. There is therefore no repository definition of a data block to which the generated items can belong.
    Form Generator resolves this situation by creating a control block to which the generated non-base table items can belong. The generated block is given the name CG$CTRL.
    The CG$CTRL block has no physical representation in the generated form and has none of the properties (e.g. block decoration) associated with generated data blocks. The CG$CTRL block is simply a logical object to which generated
    So try to find out in which form the above procedure /program unit is being called and then modify the pll accordingly....
    Rajesh Alex

  • Error while compiling a custom pll with forms 11g and weblogic

    Hi there,
    I just posted a thread here:
    Error FRM-30312 while compiling a custom pll library on forms 11g weblogic
    please, I need help

    Why wouldn't you post in the proper forum, i.e the Forms forum

  • Error while opening the custom forms-''function not available to this respo

    Error: Function not available to this responsibility , change responsibility or contact ur system administrator
    Hiiiii,
    While accessing the custom forms in release 12i we are facing the popup error and the form is not getting opened up: "Function Not available to this responsibility. Change Responsibilities or Contact your System Administrator"...
    I check the custom top path in $APPL_TOP/admin/adovars.env... its fine there..
    but the $Apache_top is not there...
    can u plz tell me the solution....
    Thanks
    Meenakshi Verma

    user609981 ,
    If ur referring to forms, u need to search in appropriate forum, as this forum is only for OAF queries, and if its realted to OAF page, check the the function of oa page is attached to the specific responsibilty .
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Error while opening supplier/customer forms and payment manager templates

    we are having 11.1.0.7 database and 12.1.1 E-business suite with 10.1.2.3 forms
    user is getting
    Error Page
    You have encountered an unexpected error. Please contact the System Administrator for assistance.
    while accessing supplier/customer forms and payment manager templates and this gets resolved after bouncing the application. the current instance is a staging one and this will be replicated to production so please help or suggest any solution or work around
    thanks
    pankaj

    There should be a link on the error page for further details about the error. Can you post the contents of that error link page ?
    Pl also check the Apache logs for any errors - see MOS Doc 419839.1 (How to enable Apache, OC4J and OPMN logging in Oracle Applications R12) for name and location of the Apache log files.
    HTH
    Srini

  • Bind variable error while running panel

    I'm working on a swing application where the user enters a value and gets a list with search results.
    I performed Following steps:
    1) Created View Object (join over three tables) with a bind variable
    2) Added View Object to Application module
    3) created new empty runnable panel
    4) Added a text field and a button to this panel
    5) Added following code to button
    private void jButton1_actionPerformed(ActionEvent e)
    String text = jTextField1. getText();
    ViewObject vO = panelBinding.getApplication().findCustomViewObject("ListSampleQueryView1", "lt.moe.icisem.model.samples.view.ListSampleQueryViewDefImpl");
    vO.setWhereClauseParams(new Object[]{text});
    vO.executeQuery();
    When I testrun the panel, get following exception
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation.
    Question: Why is the query statement issued while running the panel and not while I press tht button? And how can I avoid this error?
    Please help.
    Thanks.
    Jan

    I'm working on a swing application where the user enters a value and gets a list with search results.
    I performed Following steps:
    1) Created View Object (join over three tables) with a bind variable
    2) Added View Object to Application module
    3) created new empty runnable panel
    4) Added a text field and a button to this panel
    5) Added following code to button
    private void jButton1_actionPerformed(ActionEvent e)
    String text = jTextField1. getText();
    ViewObject vO = panelBinding.getApplication().findCustomViewObject("ListSampleQueryView1", "lt.moe.icisem.model.samples.view.ListSampleQueryViewDefImpl");
    vO.setWhereClauseParams(new Object[]{text});
    vO.executeQuery();
    When I testrun the panel, get following exception
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation.
    Question: Why is the query statement issued while running the panel and not while I press tht button? And how can I avoid this error?
    Please help.
    Thanks.
    Jan

  • Bind variable error while adding dynamic where clause to VO query

    hi
    i have extended a VO and in the VOImpl i have written the following code
    public class HzPuiClassificationListVOExImpl extends HzPuiClassificationListVOImpl
    public void initQuery(String partyId, String s1, String classCode)
    /* Logging Code*/
    if(this.isLoggingEnabled(OAFwkConstants.PROCEDURE))
    {this.writeDiagnostics(this," > initQuery() , partyId ="+partyId+" , s1 ="+s1+", classCode="+classCode,OAFwkConstants.PROCEDURE);}
    setWhereClauseParams(null);
    setWhereClauseParam(0, classCode);
    setWhereClauseParam(1, classCode);
    setWhereClauseParam(2, partyId);
    String query = super.getQuery();
    * Check if the whereClause is already present
    if(query!=null && query.toUpperCase().indexOf("AAAAA") == -1)
    OAApplicationModule am = (OAApplicationModule)this.getApplicationModule();
    OADBTransaction oadbTxn = am.getOADBTransaction();
    String whereClause = "   class_category IN ("+
    *" SELECT flv.lookup_code"+*
    *" FROM fnd_lookup_values flv, fnd_lookup_values_dfv dfv"+*
    *" WHERE flv.rowid = dfv.row_id"+*
    *" AND flv.lookup_type = 'XXXXX'"+*
    *" AND dfv.context_value = flv.lookup_type"+*
    *" AND dfv.oco_enabled = 'Y' "+*
    this.addWhereClause(whereClause);
    this.executeQuery();
    * This is the default constructor (do not remove)
    public HzPuiClassificationListVOExImpl()
    when i run the page i get this error
    java.sql.SQLException: Missing IN or OUT parameter at index:: 2
    the original vo query below has 3 bind variables
    SELECT *
    FROM (SELECT *
    FROM (SELECT cc.class_category
    ,l.meaning
    FROM hz_class_categories cc
    ,fnd_lookup_types_vl l
    WHERE cc.class_category = l.lookup_type
    AND l.view_application_id = 222
    AND EXISTS (
    SELECT NULL
    FROM hz_code_assignments ca
    WHERE ca.owner_table_name = 'HZ_CLASS_CATEGORIES'
    AND ca.owner_table_id IS NULL
    AND ca.owner_table_key_1 = cc.class_category
    AND ca.class_category = 'CLASS_CATEGORY_GROUP'
    AND ca.class_code = :1
    AND NVL (ca.status, 'A') = 'A'
    AND SYSDATE BETWEEN ca.start_date_active AND NVL (ca.end_date_active, SYSDATE + 1))
    UNION ALL
    SELECT cc.class_category
    ,l.meaning
    FROM hz_class_categories cc
    ,fnd_lookup_types_vl l
    WHERE cc.class_category = l.lookup_type
    AND l.view_application_id = 222
    AND 'INDUSTRIAL_GROUP' <> :2
    AND NOT EXISTS (
    SELECT NULL
    FROM hz_code_assignments ca
    WHERE ca.owner_table_name = 'HZ_CLASS_CATEGORIES'
    AND ca.owner_table_id IS NULL
    AND ca.owner_table_key_1 = cc.class_category
    AND ca.class_category = 'CLASS_CATEGORY_GROUP'
    AND NVL (ca.status, 'A') = 'A'
    AND SYSDATE BETWEEN ca.start_date_active AND NVL (ca.end_date_active, SYSDATE + 1))
    AND hz_classification_v2pub.is_valid_category ('HZ_PARTIES'
    ,cc.class_category
    ,:3) = 'T') a
    WHERE EXISTS (
    SELECT NULL
    FROM hz_class_code_denorm
    WHERE class_category = a.class_category
    AND TRUNC (SYSDATE) BETWEEN NVL (start_date_active, TRUNC (SYSDATE)) AND NVL (end_date_active, TRUNC (SYSDATE))
    AND enabled_flag = 'Y'
    AND LANGUAGE = USERENV ('LANG'))) qrslt
    A similar error was discussed at this link but it did not give final solution
    [http://kr.forums.oracle.com/forums/thread.jspa?threadID=618451]
    help me to solve this issue..
    Thanks,
    Varun
    Edited by: user10707840 on May 19, 2009 7:18 AM

    its not the AM code .. its the code in VOImpl...
    the same code is working in 11i but when its migrated to R12 its giving this error..
    The original seeded VO query in 11i contains the same bind variable :1 at three places
    SELECT * FROM (select class_category, meaning from hz_class_categories, fnd_lookup_types_vl l where hz_class_categories.class_category = l.lookup_type and l.view_application_id = 222 and class_category in (select owner_table_key_1 from hz_code_assignments ca where ca.owner_table_name = 'HZ_CLASS_CATEGORIES' and ca.owner_table_id is null and ca.class_category = 'CLASS_CATEGORY_GROUP' and ca.class_code = :1 and nvl(ca.status, 'A') = 'A' and sysdate between ca.start_date_active and nvl(ca.end_date_active, sysdate+1)) union all select cc.class_category , meaning from hz_class_categories cc, fnd_lookup_types_vl l, hz_class_category_uses cu where cc.CLASS_CATEGORY = cu.class_category AND ( UPPER(CU.ADDITIONAL_WHERE_CLAUSE) LIKE decode(:1, 'ORG_GROUP','%PARTY_TYPE%ORGANIZATION%', 'PERSON_GROUP', '%PARTY_TYPE%PERSON%', '%') or CU.ADDITIONAL_WHERE_CLAUSE IS NULL or UPPER(CU.ADDITIONAL_WHERE_CLAUSE) LIKE '%WHERE 1=1%' ) and cu.owner_table = 'HZ_PARTIES' and cc.class_category = l.lookup_type and l.view_application_id = 222 and cc.class_category not in (select owner_table_key_1 from hz_code_assignments hca where hca.owner_table_name = 'HZ_CLASS_CATEGORIES' and hca.owner_table_id is null and hca.class_category = 'CLASS_CATEGORY_GROUP' and nvl(hca.status, 'A') = 'A' and sysdate between hca.start_date_active and nvl(hca.end_date_active, sysdate+1)) and cc.class_category not in ( 'RELATIONSHIP_TYPE_GROUP', 'CLASS_CATEGORY_GROUP') and 'INDUSTRIAL_GROUP' <> :1) QRSLT ORDER BY meaning
    the code working in 11i had only one setWhereClauseParam line i.e. setWhereClauseParam(0, classCode);
    when i ran the same code in R12 it errd out..
    I checked the original R12 query... it has 3 bind variables :1 , :2 and :3 ... so i added 2 more setWhereClauseParam statements
    setWhereClauseParam(1, classCode);
    setWhereClauseParam(2, partyId);
    but still its giving the same error
    ORIGINAL R12 query already posted above...

  • Bad bind variable error in oracle forms 10g

    i have a created a table in oracle database 10g
    create table myimage(image_id number, image_name BLOB);
    i want insert an image and retrieve an image through programing(don't want block level) in oracle forms 10g
    without using java beans(and finely working in both windows XP2 and Solaries)
    how can i do this please can anybody give me the source code to do this because i am new in oracle forms.
    i need a immediate replay to this answer why because i have urgent requirement on this in my web erp project

    You can use WEBUTIL to do so, but
    without using java beans(and finely working in both windows XP2 and Solaries)WEBUTIL also contains javabean. I don't know why you have this restriction, i'd say you won't succeed without any java-bean.

  • Bad bind variable & best practice for delete

    I am working with three tables and very new to SQL. I need to create a procedure that will accept an ID and go through two sub tables and delete child records. Item is the main table. I am passing in the ID into the procedure and I want to use it as below. I keep getting a bad bind variable error message. I have verified that the table is setup as a number and my procedure accepts a number. I also want someone to review this from best practice as I am new to procedures.
    PROCEDURE DeleteItem (p_ItemID IN NUMBER, p_RowsAffected OUT number)
    IS
    p_RowsAffected NUMBER;
    -- select the itemdetail for the analysis
    CURSOR c_itemdetail
    IS
    SELECT
    itemdetailid
    FROM itemDETAIL
    WHERE itemid = :p_ItemID;
    BEGIN
    -- loop through each itemdetail and delete the itemdetailoutlay
    FOR r_itemdetail IN c_itemdetail
    LOOP
    BEGIN
    DELETE FROM ITEMDETAILOUTLAY
    WHERE itemdetailid = r_itemdetail.itemdetailid;
    COMMIT;
    END;
    END LOOP;
    -- delete the itemdetail
    BEGIN
    DELETE FROM ITEMDETAIL
    WHERE itemid = :p_ItemID;
    COMMIT;
    END;
    -- delete the main item
    BEGIN
    DELETE FROM ITEM
    WHERE itemdid = :p_ItemID;
    COMMIT;
    p_RowsAffected := SQL%ROWCOUNT;
    END;
    END DeleteItem;

    Hi,
    Welcome to the forum!
    As you may notice, this site normally compresses white-space. Whenever you post code, or any formatted text, on this site, type these 6 characters:
    \(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.
    I don't think you mean to use bind variables anywhere, so don't use colons before any variable names.  You were doing this correctly with p_RowsAffected; do the same thing with p_ItemID.
    Try this:PROCEDURE DeleteItem (p_ItemID IN NUMBER, p_RowsAffected OUT number)
    IS
    -- p_RowsAffected NUMBER;     -- Don't name local variables the same as arguments
    -- select the itemdetail for the analysis
    CURSOR c_itemdetail
    IS
    SELECT
    itemdetailid
    FROM itemDETAIL
    WHERE itemid = p_ItemID;     -- No : before p_ItemID
    BEGIN
    -- loop through each itemdetail and delete the itemdetailoutlay
    FOR r_itemdetail IN c_itemdetail
    LOOP
    BEGIN
    DELETE FROM ITEMDETAILOUTLAY
    WHERE itemdetailid = r_itemdetail.itemdetailid;
    COMMIT;
    END;
    END LOOP;
    -- delete the itemdetail
    BEGIN
    DELETE FROM ITEMDETAIL
    WHERE itemid = p_ItemID;     -- No : before p_ItemID
    COMMIT;
    END;
    -- delete the main item
    BEGIN
    DELETE FROM ITEM
    WHERE itemdid = p_ItemID;     -- No : before p_ItemID
    COMMIT;
    p_RowsAffected := SQL%ROWCOUNT;
    END;
    END DeleteItem;
    The most important "best practice" with PL/SQL is to avoid doing it whenever possible. 
    If SQL offers a way o do the same thing, it's usally best not to code anything in PL/SQL.
    Have you considered foreign key constraints, with "ON DELETE CASCADE"?  That way, you could simply "DELETE FROM item", and all the dependent rows in the other tables would automatically be deleted.   You wouldn't need to remember to call a procedure like this; in fact, you would have no need for a procedure like this.
    Given that you do have such a procedure:
    You're doing row-by-row processing, which some mad wags like to call "slow-by-slow" processing.
    For example, iYou're xplicitly finding each ItemDetailID separately, and deleting each one separately, like this:... CURSOR c_itemdetail
    IS
    SELECT
    itemdetailid
    FROM itemDETAIL
    WHERE itemid = p_ItemID;
    -- loop through each itemdetail and delete the itemdetailoutlay
    FOR r_itemdetail IN c_itemdetail
    LOOP
    BEGIN
    DELETE FROM ITEMDETAILOUTLAY
    WHERE itemdetailid = r_itemdetail.itemdetailid;
    COMMIT;
    END;
    END LOOP;
    It's more efficient for the system (and less coding for you) if you let SQL handle as much as possible, so do this instead...     DELETE FROM ItemDetailOutlay
         WHERE ItemDetailID IN
              ( SELECT itemdetailid
              FROM     itemDETAIL
              WHERE     itemid     = p_ItemID
    Do you really want to COMMIT 3 times?  0 or 1 times might be better.
    What happens if there is some kind of error, say, after you've delete rows form ItemDetailOutlay and ItemDetail, but before you've delete from Item?  Wouldn't you want the entire transaction to fail, and leave all three tables in a consistent state?  If so, either have the calling procedure COMMIT, or have a single COMMIT at the end of DelteItem.
    Edited by: Frank Kulash on May 6, 2010 2:25 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Getting error while activating the smart form

    hi guys,
    i am getting the following run time error while activating the smart-form.
    'SQL error in the database when accessing a table'.
    can anyone tell why this error is coming

    Refer to the below link, it may help you to close the thread.
    [SQL error in the database when accessing a table|SQL error in the database when accessing a table.;
    Regards,
    saiRam

  • Getting Errors in PL/SQL - bad bind variable and encountered the symbol...

    CREATE OR REPLACE TRIGGER update_QOH
    AFTER INSERT ON ORDERLINE
    FOR EACH ROW
    DECLARE
         QOH_PRODUCT PRODUCT.QOH%TYPE;
    BEGIN
         SELECT QOH INTO QOH_PRODUCT FROM PRODUCT WHERE :old.product_no = :new.product_no;
         IF :new.QTY <= :old.QOH THEN
              QOH = :old.QOH - :new.QTY
         ELSE
              send_email(ord_no, 'Backorder');
              INSERT INTO BACKORDER (backorder_no_seq.NEXTVAL, :new.product_no, :new.qty, SYSDATE);
              INSERT INTO PRODVENDOR (po_no_seq.NEXTVAL, :new.vendor_no, :new.product_no, :new.vend_qty, :new.shipping_method, SYSDATE, NULL, NULL, NULL);
         END IF;
    END;
    Error(5,17): PLS-00049: bad bind variable 'OLD.QOH'
    Error(6,7): PLS-00103: Encountered the symbol "=" when expecting one of the following: := . ( @ % ;
    Error(6,9): PLS-00049: bad bind variable 'OLD.QOH'

    Hi,
    Welcome to the forum!
    I see 4 mistakes:
    851543 wrote:
    CREATE OR REPLACE TRIGGER update_QOH
    AFTER INSERT ON ORDERLINE
    FOR EACH ROW
    DECLARE
         QOH_PRODUCT PRODUCT.QOH%TYPE;
    BEGIN
         SELECT QOH INTO QOH_PRODUCT FROM PRODUCT WHERE :old.product_no = :new.product_no;
         IF :new.QTY <= :old.QOH THEN
              QOH = :old.QOH - :new.QTY(1) The variable qoh isn't declared.
    (2) Did you mean the assignment operator, :=, rather than the equality operator, = ?
    (3) An assignment statement must end with a semi-colon.
         ELSE
              send_email(ord_no, 'Backorder');(4) The variable ord_no isn't declared.
              INSERT INTO BACKORDER (backorder_no_seq.NEXTVAL, :new.product_no, :new.qty, SYSDATE);
              INSERT INTO PRODVENDOR (po_no_seq.NEXTVAL, :new.vendor_no, :new.product_no, :new.vend_qty, :new.shipping_method, SYSDATE, NULL, NULL, NULL);
         END IF;
    END;
    /While you can reference :NEW and :OLD values in the trigger, it doesn't make any sense to reference the :OLD values. On an INSERT (which is the only time this trigger fires), all :OLD values are NULL.
    >
    Error(5,17): PLS-00049: bad bind variable 'OLD.QOH'
    Error(6,7): PLS-00103: Encountered the symbol "=" when expecting one of the following: := . ( @ % ;
    Error(6,9): PLS-00049: bad bind variable 'OLD.QOH'I don't believe the code you posted is causing these errors. Each of the errors mentioned above would cause a different message. Post the actual code and error messages.
    Whenever you post a question, post all the code necessary for people to re-create the problem and test their ideas.
    In this case, that means CREATE statements for any tables or sequences involved, INSERT statements for any tables that need rows (such as product) as they exist before the INSERT, some INSERT statements for orderline, and the contents of all the tables after each of those INSERTs.
    Always say which version of Oracle you're using.

  • Error in trigger: PLS-00049: bad bind variable

    Hi,
    I am trying one of the XML/XDK samples from technet (http://otn.oracle.com/tech/xml/htdocs/XDBDemo2.html) and get this error while compiling the trigger: here's the code snippet
    create or replace trigger PURCHASEORDEREXPLOSION
    instead of insert on NEWPURCHASEORDER
    for each row
    declare
    begin
    DOCUMENT := :new.PODOCUMENT; <--Error here: PLS-00049: bad bind variable 'NEW.PODOCUMENT'
    I can't understand why is this happening? Any clues??
    Thanks!
    -Rajeev

    You don't specify bind variables with the colon ":" prefix in PL/SQL.
    The procedure you posted builds a query using string concatenation. Even if you remove the colon from your variable name you still won't be using bind variables.
    If you want to use bind variables you should consider doing the following:
    1. Use the DBMS_SQL package.
    2. Use EXECUTE IMMEDIATE with the USING clause.
    3. Use OPEN <REF CURSOR> FOR <STATEMENT> with the USING clause.
    Each one has different advantages/disadvantages.
    If looks as if you want to pass in a dynamic IN list. If you use bind variables it will effectively treat the entire list as ONE value enclosed in single quotes. If you truly want a dynamic IN list you need to investigate another method.
    Tom Kyte has some information on Dynamic IN lists here: [How can I do a variable in list?|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:210612357425]

Maybe you are looking for

  • BO WebI Report Issue

    Hi , We are using Greenplum + BO , We can able to connect the BO with greenplum in Universe. While we connect to the Webi we are getting the below attached issue , Please help us to resolve.

  • Reader X cannot open dosument in Firefox 4

    Hi I lately installed Windwos 7 (32bit) professional from the scratch. I was also installing Abobe Reader X and afterwards Abode CS3 Design premium, which i updated after installation. Now, PDF files usually don't open in Firefox 4 (sometimes they do

  • Can't access 2d Hard Drive

    Am running Windows 7 Home Premium 64 bit. System has worked fine for over a year. All of a sudden, I cannot access files on my 2d HDD (WD 1TB).  Checked drive thru My Computer. Drive appears as NTFS Drive and shows 0 bytes for size. Am unable to acce

  • Problems displaying in IE

    While I love iWeb's ease of use, it seems to have serious problems displaying on IE. There is really no point blaming IE, since it is the dominant browser and most people who will see our sites will use it. The point of iWeb should be to allow people

  • Since I have iOS7, I can't have any USB connexion with my Macbook pro!!!! even after another my iphone was exchanged, I think there is a bug in IOS7!!!

    Since I have iOS7, I can't have any USB connexion with my Macbook pro!!!! even after another my iphone was exchanged, I think there is a bug in IOS7!!!