Bad Bind Variable Error In Oracle Forms
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring bad bind variable in oracle developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question
Bad Bind Variable In Trigger Oracle
x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; pls 00049 bad bind variable it only takes a minute: Sign up Error 49 bad bind variable oracle forms up vote 2 down vote favorite I would like to ask regarding this error... Error 49 at line 5, column 6 bad bind variable 'S_ORD.payment_type' Here is the code: DECLARE N NUMBER; v_credit S_CUSTOMER.credit_rating%type; BEGIN IF :S_ORD.payment_type = 'CREDIT' THEN SELECT credit_rating INTO v_credit FROM S_CUSTOMER WHERE :S_ORD.customer_id = id; IF v_credit NOT IN ('GOOD', 'EXCELLENT') THEN :S_ORD.payment_type:= 'CASH'; n:=SHOW_ALERT('Payment_Type_Alert'); END IF; END IF; END; I'm new to oracle forms so I'm not sure if I have a missing setup or anything. S_ORD table exist and has a column payment_type, which consists of 'CREDIT' and 'CASH' value. Thank you. sql forms oracle variables bind share|improve this question asked Jul 5 '12 at 3:39 mysticfalls 12511222 The IF statement references :S_ORD.payment_type, which isn't declared/etc before. It's seen as a BIND variable because of the colon ":". How are you attempting to run this? A script is the only way that makes sense to me ATM. –OMG Ponies Jul 5 '12 at 3:49 @OMG Ponies I'm executing a form named ORDERS...should this be declared or is there anything else I can check that may cause this error..thanks –mysticfalls Jul 5 '12 at 4:07 I don't know Forms, sorry –OMG Ponies Jul 5 '12 at 4:26 add a comment| 4 Answers 4 active oldest votes up vote 0 down vote Oracle Forms doesn't allow the use of bind variables when the code is in a library or a menu. Here is a quote from the Oracle Forms (6i) help: You can reference items indirectly with the NAME_IN and COPY built-in subprograms. The NAME_IN function returns the contents of an indicated variable or item. Use the NAME_IN function to get the value of an item without referring to the item directly. The following statements are equivalent: IF :emp.ename = 'smith' -- direct reference IF NAME_IN('emp.ename') = 'smith' -- indirect reference The return value is always a character string. To use NAME_IN for a DATE or NUMBER item, convert the string to the desired data type with the appropriate conve
02 January 2008 01:55 sgona Messages: 5Registered: December 2007 Location: pune Junior Member Hi, When i am creating queryfind in myform, I am getting error in creating the fmx. Like Compilation error on WHEN-BUTTON-PRESSED trigger on FIND item in QF_BLOCK data block: PL/SQL ERROR 49 at line 7, column 1 bad bind variable 'PARAMETER.G_QUERY_FIND' PL/SQL ERROR 49 at line 7, column 1 bad bind variable 'PARAMETER.G_QUERY_FIND' PL/SQL ERROR 49 at line 9, column 1 bad bind variable 'PARAMETER.G_QUERY_FIND' Plzzz help me. [MERGED by LF: please, do not open a new topic about the same problem. There is a "REPLY" button in there to continue discussion.] [Updated on: Wed, 02 January 2008 04:25] by ModeratorReport message to a moderator http://stackoverflow.com/questions/11337582/error-49-bad-bind-variable-oracle-forms Re: bad bind variable error when creating queryfind. [message #290932 is a reply to message #290907] Wed, 02 January 2008 04:00 mintomohan Messages: 104Registered: November 2006 Location: India Senior Member hi, Can u pls attach the fmb Minto Report message to a moderator bad bind variable error when creating queryfind. [message #290939 is a reply to message #290907] Wed, 02 January 2008 04:13 sgona Messages: 5Registered: December 2007 Location: pune Junior Member Hi, Thans for http://www.orafaq.com/forum/t/94940/ u r reply.I am attaching fmb here. When i am creating queryfind in myform, I am getting error in creating the fmx. Like Compilation error on WHEN-BUTTON-PRESSED trigger on FIND item in QF_BLOCK data block: PL/SQL ERROR 49 at line 7, column 1 bad bind variable 'PARAMETER.G_QUERY_FIND' PL/SQL ERROR 49 at line 7, column 1 bad bind variable 'PARAMETER.G_QUERY_FIND' PL/SQL ERROR 49 at line 9, column 1 bad bind variable 'PARAMETER.G_QUERY_FIND' It is compling successfully. But when i am generating fmx it is giving error. Plzzz help me. Attachment: APINVOICEFORM1.fmb (Size: 556.00KB, Downloaded 401 times) Report message to a moderator Re: bad bind variable error when creating queryfind. [message #290943 is a reply to message #290907] Wed, 02 January 2008 04:22 Littlefoot Messages: 20827Registered: June 2005 Location: Croatia, Europe Senior MemberAccount Moderator Does your form contain a block named 'parameter'? Is there an item called 'g_query_find'? Report message to a moderator Re: bad bind variable error when creating queryfind. [message #290946 is a reply to message #290939] Wed, 02 January 2008 04:27 vamsi kasina Messages: 2107Registered: October 2003 Location: Riyadh, Saudi Arabia Senior Member (Or) Do you think you forgot to define a parameter named G_QUERY_FIND in the Parameters section? By Vamsi Report message to a moderator Re: bad bind variable error when creating queryfind. [message #290947 is a reply to message #29094
Description and Image(of the book) I have written a PL/SQL code to display the image of the respective book http://oracledba.bigresource.com/Forms-Error-during-compilation-Bad-Bind-Variable-KPzh59efo.html for every new record. E.g Book1 should display image1, book2 displays image2 and so on. This should happen at runtime. The code is: declare gif_image varchar2(80):='c:ProjectBooks'; photo_filename varchar2(80); begin photo_filename := gif_image||lower(:books.sr_no)||'.gif'; [code]....... The error i get during compilation is Error 49 at Line 5, column 37 bad bind variable 'books.sr_no' View 4 Replies Similar Messages: Forms :: Bad Bind bad bind Variable Error? Forms :: Error 49 Bad Bind Variable? Forms :: Data Block Based On Procedure - Getting Compilation Error Forms :: Getting Error At Compilation Time / To Insert Images Into Table SQL & PL/SQL :: How To Use Bind Variable SQL & PL/SQL :: Bind Variable OLD Not Declared SQL & PL/SQL :: Bind Variable In Views? Bind Variable bad bind variable In Parsing? PL/SQL :: Bind And Define Variable SQL & PL/SQL :: PLS-00049 Bad Bind Variable? SQL & PL/SQL :: Bind Variable - Invalid Table Name SQL & PL/SQL :: SP2-0552 / Bind Variable NEW Not Declared PL/SQL :: Bind Variable As A Literal String Value SQL & PL/SQL :: Bind Variable Inside Procedure? PL / SQL - Constant Recognized As Bind Variable By Oracle? SQL & PL/SQL :: Bind Variable For Dynamic Query In Procedure SQL & PL/SQL :: Print Message Just Before Asking For Input To Bind Variable? PL/SQL :: Open Ref Cursor Using Collection As Bind Variable PL/SQL :: How To Use Bind Variable In The Query To Avoid Hard Parsing Performance Tuning :: Avoiding Bind Variable From Sql In Java Code? Performance Tuning :: Difficulty In Using Bind Variable To Check Explain Plan SQL & PL/SQL :: Compilation Error In 11.2.0.3 Forms :: Frm-40815 Error Variable Does Not Exist SQL & PL/SQL :: Compilation Error In Procedure SQL & PL/SQL :: Compilation Error In Procedure? SQL & PL/SQL :: Package Compilation Error SQL &