'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.

Similar Messages

  • 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.

  • Parameter error - bad bind variable in a Package..!!

    Hello All
    i am tring to create a security package with in one procedure i am trying to handle the number of times the user enters the wrong user name or password:
    -i created a parameter on my login form and add it to my procedure and it works just fine,But when i tried to copy the same procedure the package inside my library can't recognize that Parameter.
    -It gives me error : bad bind variable.
    The code is as follows.
    PARAMETER.COUNT := :PARAMETER.COUNT + 1;
    IF :PARAMETER.COUNT > 3 THEN
    WRONG_ALERT('WRONG_PASS',' ur number of trials has expiered the form will be closed ');
    EXIT_FORM;
    END IF;
    Can anyboady help me pls.
    Regards,
    Abdetu.

    Super,It works Just fine.
    Thanks Gerd,
    That's make me decide that if i have the following statatment for example:
    IF :USER_CODE IS NULL THEN .........
    I have to change it to :
    IF copy (name_in ('USER_CODE' )) IS NULL THEN..........
    But,if i have the following select statment :
    ==============================
         SELECT USER_CODE , USER_PASS WORD
         INTO :GLOBAL.USER_CODE , :GLOBAL.USER_PASS WORD
         FROM APP_USERS
         WHERE USER_CODE = :USER_CODE
         AND USER_PASS WORD= :USER_PASS WORD;
    Should i transfer it to the following:
    =========================
    SELECT USER_CODE , USER_PASS WORD
    INTO     COPY(NAME_IN ('GLOBAL.usr_code'), COPY(NAME_IN ('GLOBAL.PASSWORD')
    FROM APP_USERS
         WHERE USER_CODE = COPY(NAME_IN ('USER_CODE' )
    AND USER_PASS WORD=COPY(NAME_IN ('USER_PASS WORD');
    Pls help me,it's my first time ...
    Thanks in advance.
    Regards,
    Abdetu.

  • 10g declare :global variable error (bad bind variable)

    In a 10g form, I tried this code in the pl/sql block and in the spec of a library package
    begin
       :global.config := 'x';
    ...upon compile, I get an error
    "bad bind variable"
    ...encountered the symbol "GLOBAL" when expecting one of the following...It doesn't like :GLOBAL.variablename := 'x';
    What am I doing wrong?
    Thank you.

    globals are allowed in librarys, but in libraries you have to use COPY and NAME_IN to access objects you access via :-logic in forms-modules, e.g. setting the global would be like
    COPY('X', 'GLOBAL.CONFIG');Edited by: aweiden on 29.10.2008 19:33

  • Image Item - Error: bad bind variable

    Hi All,
    I select a Image field from a table and set it to a Image Item in a form 10g. But I have error "Bad bind variable"
    Here is source code in my Post_query trigger:
    SELECT cust_sign INTO :dema_depo.dema_depo_sign
    FROM cust_sign WHERE custcod = :dema_depo.cust_sign_custcod;
    I would like to learn if you have any solution or document to solve my problem.
    Thanks very much for your help!
    BACH

    Dear Sir/Madam,
    I'm reading chapter 16: Working with Images - Oracle Forms Developer's Guide and found that cannot write a SELECT statement to select a a LONG RAW value INTO an image item.
    Thus, any the other way to fetch fr a DB LONG RAW value INTO an image item ???
    Many thanks!
    BACH

  • 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.

  • 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.

  • PLS-00049 error :bad bind variable

    We recently migrated our dev databse to 10g
    for the following table the trigger is erroring out as follows :
    The same trigger works in 9i production though .Can anyone see anything that might be amiss
    CREATE TABLE ARCH_CLAIM_REJECTION_CODES
    REJECTION_ID NUMBER(38) NOT NULL,
    REJECTION_DESC VARCHAR2(600 BYTE),
    DT_STAMP NUMBER,
    DT_CREATED DATE,
    DT_LAST_UPDATED DATE
    INSERT INTO CLAIM VALUES (
    :OLD.REJECTION_ID,
    :OLD.REJECTION_DESC,
    :OLD.DT_STAMP,
    :OLD.DT_LAST_UPDATED,
    :OLD.DT_CREATED
    PLS-00049: bad bind variable 'OLD.REJECTION_ID'
    PLS-00049: bad bind variable 'OLD.REJECTION_DESC'
    PLS-00049: bad bind variable 'OLD.DT_STAMP'
    PLS-00049: bad bind variable 'OLD.DT_LAST_UPDATED'
    PLS-00049: bad bind variable 'OLD.DT_CREATED'

    REATE OR REPLACE TRIGGER ODSLIVE.TR_CLAIM_REJECTION_CODES_BUR
    BEFORE UPDATE ON CLAIM_REJECTION_CODES
    FOR EACH ROW
    DECLARE
    gv_errcode VARCHAR2(100);
    gv_errmsg VARCHAR2(100);
    BEGIN
    --DBMS_OUTPUT.PUT_LINE('TRIGGER CALLED FOR CLAIM_REJECTION_CODES');
    INSERT INTO ARCH_CLAIM_REJECTION_CODES VALUES (
    :OLD.REJECTION_ID,
    :OLD.REJECTION_DESC,
    :OLD.DT_STAMP,
    :OLD.DT_LAST_UPDATED,
    :OLD.DT_CREATED
    EXCEPTION
    WHEN OTHERS THEN
    gv_errcode :=SQLCODE;
    gv_errmsg :=SQLERRM;
    PKG_COMMONACTIVITIES.PR_ERRORLOG_DETAILS('TRIG-01-0001',
    gv_errcode,
    gv_errmsg,
    'TR_CLAIM_REJECTION_CODES_BUR',
    'CLAIM_REJECTION_CODES');
    --DBMS_OUTPUT.PUT_LINE('TM-01-0001 '||'TR_CLAIM_REJECTION_CODES_BUR '||'CLAIM_REJECTION_CODES'||gv_errmsg);
    --RAISE;
    END TR_CLAIM_REJECTION_CODES_BUR;

  • TRIGGER ERROR: bad bind variable

    Hello,
    I'm just starting off with oracle and am trying to do the same as auto_increment in mysql is doing by creating this sequence and trigger, but on the trigger I am getting the following error:
    error:
    PLS-00049: bad bind variable 'TAKEOVER_USERS.TAKEOVER_UID'This is the code for trigger, table and sequence:
    trigger:
    CREATE OR REPLACE TRIGGER  "TAKEOVER_USERS_T1"
    BEFORE
    insert on "TAKEOVER_USERS"
    for each row
    begin
    select TAKEOVER_UID.nextval into :takeover_users.TAKEOVER_UID from dual;
    end;Table:
    CREATE TABLE  "TAKEOVER_USERS"
       ( "TAKEOVER_UID" NUMBER NOT NULL ENABLE,
    "TAKEOVER_FBID" VARCHAR2(20) NOT NULL ENABLE,
    "takeover_accepted_terms" NUMBER(1,1) NOT NULL ENABLE,
    "takeover_lastName" VARCHAR2(30),
    "takeover_firstName" VARCHAR2(30),
    "takeover_country" VARCHAR2(40),
    "takeover_session" VARCHAR2(50) NOT NULL ENABLE,
    "takeover_created" TIMESTAMP (6) NOT NULL ENABLE,
      CONSTRAINT "takeover_users_PK" PRIMARY KEY ("TAKEOVER_UID") ENABLE
       )sequence:
    CREATE SEQUENCE   "TAKEOVER_UID"  MINVALUE 1 MAXVALUE 99999999999999 INCREMENT BY 1 START WITH 1 NOCACHE  NOORDER  NOCYCLEYou got any idea what I need to change to make this work?
    Thanks!
    Christine

    if your DB is 11g you can try this
    CREATE OR REPLACE TRIGGER  "TAKEOVER_USERS_T1"
    BEFORE
    insert on "TAKEOVER_USERS"
    for each row
    begin
    :NEW.TAKEOVER_UID:=TAKEOVER_UID.nextval;
    end;if 10g or older..
    CREATE OR REPLACE TRIGGER  "TAKEOVER_USERS_T1"
    BEFORE
    insert on "TAKEOVER_USERS"
    for each ROW
    BEGIN
    SELECT TAKEOVER_UID.NEXTVAL INTO :NEW.TAKEOVER_UID FROM dual;
    end;Regards,
    Prazy

  • 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

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Bad Bind Variable? I'm trying to make a host variable!

    Okay, so I've declared a global variable:
    VARIABLE g_total NUMBER
    and I want to use this variable to hold the results of a stored procedure (I minimized my code to focus on the problem area):
    CREATE OR REPLACE PROCEDURE my_procedure
    (p_price IN m_movies.price%TYPE
    p_quantity IN m_cart.quantity%TYPE)
    IS
    BEGIN
    :g_total := p_price * p_quantity;
    DBMS_OUTPUT.PUT_LINE('Order total is: '||:g_total);
    END;
    After all this, I get an error "bad bind variable g_total" for both lines I'm using it inside the procedure. What the heck is a bind variable? I'm using a host variable! (I think). Does this have anything to do with the fact that I can only assign a very generic NUMBER datatype to the host variable? Please help!

    Hi,
    Maybe the problem is in other place, because the code works fine (I commented column types because I don't have these tables):
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    SQL>
    SQL> VARIABLE g_total NUMBER;
    SQL> DECLARE
      2     PROCEDURE my_procedure(p_price    IN NUMBER /*m_movies.price%TYPE*/,
      3                            p_quantity IN NUMBER /*m_cart.quantity%TYPE */) IS
      4     BEGIN
      5        :g_total := p_price * p_quantity;
      6        DBMS_OUTPUT.PUT_LINE('Order total is: ' || :g_total);
      7     END;
      8  BEGIN
      9     my_procedure(p_price    => 2,
    10                  p_quantity => 3);
    11  END;
    12  /
    PL/SQL procedure successfully completed
    g_total
    6
    SQL> Regards,

  • Bad Bind Variables

    Hi all,
    I have created new form based on View.If i'm trying to update the values in base tables,but it is showing me the
    Error :BAD BIND VARIABLES 'cs_estimate_details.attribute2'
    WHEN-BUTTON-PRESSED i'm writing the code like this
    :block_name.item_name := :base_table.column_name;
    :xx_discount_manager_v.discount_rate := :cs_estimate_details.attribute2 ;
    Can i directly apply into base tables or not ,if any solution plss help me in this,urget
    if any bosy having code and which trigger used pls let me know
    Regards
    Siva

    If you want to updated the contents of the view from your form which is based on the view you may want to consider using the "instead of" trigger on the view.
    Regards,
    Tony
    @ Gerd
    Welcome back :)

  • ERROR: Package deleted because of bad bind-variable

    hello,
    i believe to have a serious problem here and i need help. portal deleted packages twice because of a "bad bind variable" so i had to start over again.
    i'm trying to write a simple blackboard-application. Users can post and read posts. No answers, no threads
    This is the structure:
    Tables: categories with cat_id,cat_name
    posts with post_id,cat_id, date,user_id,title,content
    Reports for list of categories and list of posts in a certain category
    Link from category-name to list of posts in category
    This link uses :cat_id as passed parameter from category-list to list of posts
    The list of posts has this select-statement:
    SELECT post_id,cat_id,date,user_id,title
    FROM schemaname.posts
    WHERE cat_id = :cat_id;
    So far everything works fine
    Now i want to customize the look of the report. On the "Report and Customization Form Text"-Tab I wrote some html-code into the header-field. Then i tried to include a select statement to print the category-name. But everything i wrote between the <oracle></oracle>-tags was displayed as code and not parsed. So i next tried to put a select-statement into the "after header displayed"-field on the "additional PL/SQL Code"-Tab.
    This is what i wrote:
    declare
    cat varchar2(20);
    begin
    SELECT cat_name into cat
    FROM schemaname.categories
    WHERE cat_id = :cat_id;
    end;
    When i now run the report i get a 4-page error-message saying package was deleted and that i used a bad bind-variable.
    Can somebody please help?
    we use portal 30982 on 9i database and windows 2000
    Thank you very much
    Ralf Schmitt

    Hi,
    You cannot use bind variable in the additional plsql section. If you want to access the value of :cat_id then you should
    pick it up from p_arg_names and p_arg_values.
    In the additional plsql code "after header displayed"-
    declare
    cat_nm varchar2(50);
    begin
    for i in 1..p_arg_names.count
    loop
    if p_arg_names(i) = 'cat_id' then
    SELECT cat_name into cat
    FROM schemaname.categories
    WHERE cat_id = p_arg_values(i);
    exit;
    end if;
    end loop;
    htp.p('Cateegory :' ||cat_nm);
    end;
    Thanks,
    Sharmila

Maybe you are looking for