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.

Similar Messages

  • 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

  • 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

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

  • 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

  • "bad bind variable on   :PARAMETER.param_name "

    Forms version : forms 6i
    In Form A
    Trigger : WHEN_LIST_CHANGED
    DECLARE
    list_id PARAMLIST;
    BEGIN
    -- Testing to see if value present in lobal var
    :OT_NES.TEXT_ITEM154 := :GLOBAL.selected_node;
    :OT_NES.TEXT_ITEM153 := :OT_NES.LIST150;
    list_id := Create_Parameter_List('GES_SETUP_DATA');
    Add_Parameter(list_id,'tree_node',TEXT_PARAMETER,:GLOBAL.selected_node);
    Add_Parameter(list_id,'list_item',TEXT_PARAMETER,:OT_NES.LIST150);
    open_form('cards_config_data',ACTIVATE,NO_SESSION,list_id);
    EXCEPTION
    WHEN OTHERS THEN
    message(SQLERRM);
    END;
    IN Form B
    Trigger Name : When_New_form_instance
    DECLARE
    the_list PARAMLIST := Get_Parameter_List('list_id');
    BEGIN
    -- Getting Error here "Bad Bind variable :Parameter" ???
    :BLOCK3.TEXT_ITEM112 := :PARAMETER.tree_node ;
    END ;
    How do I retrieve the parameter values in form B ?
    Thanks in Advance
    Sharath

    :PARAMETER.<name> as you have used is the correct syntax, but you will get this error if you have not actually defined the parameter at design time in the Parameters node in the form.

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

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

    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.

  • [Error] PLS-00049 (6: 19): PLS-00049: bad bind variable 'NEW.T1NAM'

    1. create table t1
    (t1ID int,
    t1nam varchar2(33)
    2. create or replace view t1t2t3
    t1id, t1name, t2id, t2nam, t2cty, t2st, aid, aname, bid, bname, t3id, t3nam
    as
    select * from t1, t2, t1 a, t1 b, t3
    where t1.t1ID = t2.id(+)
    and T2.CTY = a.t1ID(+)
    and t2.sty = b.t1ID(+)
    and t1.t1ID = t3.t3id(+)
    3. CREATE OR REPLACE TRIGGER t1t2t3
    INSTEAD OF INSERT or update
    ON t1t2t3
    BEGIN
    insert into t1
    values(:new.t1ID, :new.t1nam);
    END t1t2t3;
    Get error:
    [Error] PLS-00049 (6: 19): PLS-00049: bad bind variable 'NEW.T1NAM'
    Pls advise. I am using Toad.
    Thanks.

    tnam1 not belongs to t1t2t3.
    :new should be used to te columns of the table on which you are writing the trigger.
    Here i think t1t2t3 has t1name field you have to use :new.t1name instead of :new.t1nam(which belongs to table t1)

Maybe you are looking for

  • Mapping in Administration Tool

    Hi All, I have created in AWM two simple cubes and so two cubeview with VIEW Generator plugin Cube 1: DIM A DIM B MEASURE 1 Cube 2: DIM A MEASURE 2 First cube is based on fact table Budgets and second cube is based on fact table Actuals So two Fact T

  • Multiple ship to parties for one sold to party.

    Hi all, Suppose we get a P.O which has material A quantity is 10. the sold to party tells that each of the 10 items must be edlivered to 10 different ship to parties. I mean each ship to party recieves 1 qty of material A. Can you explain what settin

  • Regarding collecting the BW objects through the transport conn- in backend

    Hi All, I am trying to collect all the In data flow afterwards objects of a cube through the transport connection. But it is more time as a result I am unable to retrive the result because of system timeout. My question is, is there any way to perfor

  • Processing Variable in Filter

    Hi, I have an Aggregat with a Filter F1. This Filter has also a Variable. For this selected data I have a planing function in BEx Analyzer. Unfortunately i have no idea how i can pass a value for the variable in order to restrict my aggregat by the f

  • Loading ODS

    Hi All, Scheduled a load to an ODS. The request has turned red. It has already loaded about 3 million records. In the 'Details' section of the Monitor, the TRANSFER(IDOCS TRFC) , 3 data packages, say 1, 2, 3 are red. The same data packets1, 2, 3 are