Question reg bind variable...

hi,
I have learnt that when we pass parameter to proc/func. those parameters are auto. treated as bind variables...
but what if I have a simple proc. which does not accept any argumets nor it returns anything just a batch job type for e.g to send emails.. then how will the variables declared in that proc treated as bind variables or not?
If not, how can i modify the proc to use bind variables
thx

Any PL/SQL variables or parameters will be automatically treated as bind variables in static SQL. There is nothing special you have to do.

Similar Messages

  • BC4J: Question on bind variables and DML in view objects

    Hello,
    I have a view object with a bind variable in the WHERE clause of the underlying query. I'm curious about how the state of this bind variable affects the use of the view object for inserting, updating, etc., at various stages of the commit cycle (before posting changes, after posting changes, after commit).
    Specifically, what happens in the following scenarios?
    1. The bind variable is not bound (and the query has not been executed) and a row is inserted into the VO
    2. The bind variable is set to some value and an inserted or updated row in the VO does not meet the criteria specified by the bind variable; the transaction is then committed
    If there is a weblog entry, help file, or HOWTO somewhere, I'd welcome a link to it.
    Thanks,
    Alan

    The variable would only come into play when the VO's query is executed. It can be executed implicitly -- for example, accessing the first() row if the query hasn't been executed yet -- or explicitly by a call to executeQuery().
    By setting setMaxFetchSize(0) on your VO, no rows will be fetched and you can use the VO for insert only.

  • Question about bind variables.

    Hi,
    I'm looking to do an oracle prepared statement in some code and I'm having issues with the bind variables. If I have this query:
    SELECT count(*) FROM accessp WHERE id IN (?) AND groupies LIKE \'%?%\'
    and I want to bind a list like this:
    2,4,6
    to the first ?
    and a value like this:
    cap
    to the second ?
    it seems as if it would work but I keep getting errors about oracle not seeing the bind variable. After some doing a little research I found that it looks like I need to create a type or types for my columns I'm doing the binding to.
    Is that correct?
    Any help, greatly appreciated.
    Thanks,
    Jon

    No, that doesn't work. Unfortunately this is one of the few times when PreparedStatements are inconvenient.

  • Reg bind variable error in OTL extension.

    We have done extension to OTL standard screen where we customised three LOVVO's.These are working fine in most scenario's but soemtimes for specific test cases the query TaskLOV query seems to fail.
    Error seen when we try to select the time card/click details of time card:
    SELECT * FROM (SELECT DISTINCT task.task_number tasknumber, task.task_name taskname,
    task.task_id taskid,task.billable_flag BillableFlag,task.project_id ,
    task.start_date StartDate, task.completion_date CompletionDate,
    task.scheduled_start_date ScheduledStartDate,task.scheduled_finish_date ScheduledFinishDate,
    task.chargeable_flag,
    NULL project_number, task.workplan -- count(1)
    FROM pac_online_task_v task
    WHERE TRUNC(TASK.COMPLETION_DATE) >= TRUNC(FND_DATE.CANONICAL_TO_DATE(:1))
    AND TRUNC(TASK.START_DATE) <= TRUNC(FND_DATE.CANONICAL_TO_DATE(:2))
    and TRUNC(fnd_date.canonical_to_date (:3)) between to_date('01-mar-1900') and to_date('01-mar-4020')
    and nvl(task.chargeable_flag,'N')='Y') QRSLT WHERE (TaskId = :1) ORDER BY TaskNumber
    "Not All variables Bound."
    Th LDT file for bind pramas is as follows.
    BEGIN HXC_LAYOUT_COMP_QUALIFIERS "Projects Timecard Layout - Task"
    OWNER = "ORACLE"
    QUALIFIER_ATTRIBUTE_CATEGORY = "LOV"
    QUALIFIER_ATTRIBUTE1 = "XXTaskLOVVO"
    QUALIFIER_ATTRIBUTE2 = "N"
    QUALIFIER_ATTRIBUTE3 = "XXHXC_CUI_TASK_LOV"
    QUALIFIER_ATTRIBUTE4 = "809"
    QUALIFIER_ATTRIBUTE5 = "12"
    QUALIFIER_ATTRIBUTE6 =
    "Xxtaskname|TASK-DISPLAY|CRITERIA|N|Xxtaskprojid|PROJECT|PASSIVE_CRITERIA|Y|Xxtaskid|TASK|RESULT|N|Xxtaskname|TASK-DISPLAY|RESULT|N"
    QUALIFIER_ATTRIBUTE8 = "TaskName"
    QUALIFIER_ATTRIBUTE9 = "TaskId#NUMBER"
    QUALIFIER_ATTRIBUTE10 = "custom.XXTaskLOVVO"
    QUALIFIER_ATTRIBUTE11= "TIMECARD_BIND_START_DATE|TIMECARD_BIND_END_DATE|TIMECARD_BIND_END_DATE"
    QUALIFIER_ATTRIBUTE14 =
    "Xxtaskprojid|PROJECT|Y#Xxtaskprojnum|PROJECT-DISPLAY|Y"
    QUALIFIER_ATTRIBUTE15 =
    "project_id = ::Xxtaskprojid#upper(project_number) = upper(::Xxtaskprojnum)"
    QUALIFIER_ATTRIBUTE17 = "OraTableCellText"
    QUALIFIER_ATTRIBUTE20 = "N"
    QUALIFIER_ATTRIBUTE21 = "Y"
    QUALIFIER_ATTRIBUTE22 = "L"
    QUALIFIER_ATTRIBUTE25 = "FLEX"
    QUALIFIER_ATTRIBUTE26 = "PROJECTS"
    QUALIFIER_ATTRIBUTE27 = "Attribute2"
    QUALIFIER_ATTRIBUTE28 = "TASK"
    LAST_UPDATE_DATE = "2004/05/24"
    END HXC_LAYOUT_COMP_QUALIFIERS
    I try to auto populate some values in screen and this error occurs....even without clicking on the lov. I am not sure how the task_id is getting appended at run time when we have different passive criteria's here.Am not aware if some internal validation of LOV's is getting fired when some values are autopopulated in the lov field of base page..Let me know if any bind params are incorrect in the ldt file.
    Inputs on this would be really helpful.
    Thanks,
    Swarna

    WHERE TRUNC(TASK.COMPLETION_DATE) >= TRUNC(FND_DATE.CANONICAL_TO_DATE(:1))
    AND TRUNC(TASK.START_DATE) <= TRUNC(FND_DATE.CANONICAL_TO_DATE(:2))
    and TRUNC(fnd_date.canonical_to_date (:3)) between to_date('01-mar-1900') and to_date('01-mar-4020')
    and nvl(task.chargeable_flag,'N')='Y') QRSLT WHERE (TaskId = :1) ORDER BY TaskNumberBind parameter mis match is there.
    :1 is used in TRUNC(FND_DATE.CANONICAL_TO_DATE(:1)
    and QRSLT WHERE (TaskId = :1)
    -Anand

  • Bind Variables

    Hi
    I have read happily the article The Values That Bind By Mark A. Williams (Oracle Magazine September/October 2005 ). Immediately I rushed to implement the article on over developers . The problem is that we have a SQL query using the in operators . For example : select col1,col2 ..coln from table where x in (value1,value2 ….).
    I such a case how can you \use the bind variables technique , which fit the queries in which each variable can have one value (e.g. select country_name
    from hr.countries
    where country_id = :country_id)
    I asked the following questions:
    ODP support Oracle spatial or at list using objects??
    Will ODP support oracle spetial???
    The answer are listed below.
    I tried using ODP bind variables technique using fixed array size and bind variables technique in ODP (the redundant vars were fulfilled with dummy values) . I used trace and tkprof (with SYS=NO) opposite oracle 9.2.0.5 and pare was equal to parse an fetch meaning : no reuse of execution plans.
    Do you have any IDEA????
    Best Regards
    David Yitzhak
    BSC (Information System), MBA
    .Net developer and Oracle and SQL Server Applicative /Infrastructure DBA
    From: Alex Keh [[email protected]]
    Sent: &#1497;&#1493;&#1501; &#1513;&#1504;&#1497; 10 &#1488;&#1493;&#1511;&#1496;&#1493;&#1489;&#1512; 2005 23:50
    To: Ischack David; [email protected]
    Subject: Re: Securing a .NET Application on the Oracle Database
    David,
    In your example ("select col1,col2 ..coln from table where x in (value1,value2 ….)"), x is the name of a column, which does not need to have a bind variable. You can just put in a .NET variable representing the string value of the column name and concatenate the SQL statement together.
    We are planning to supprt objects and VARRAYs around January/February. From these, you can build your own Spatial data types. Today, most .NET Spatial users employ XML when using their Spatial data in .NET.
    Alex
    ----- Original Message -----
    From: Ischack David
    To: [email protected]
    Sent: Sunday, October 09, 2005 2:27 PM
    Subject: Securing a .NET Application on the Oracle Database
    Some questions about bind variables , objects , Oracle spatial and ODP
    Hi
    I have read happily the article The Values That Bind By Mark A. Williams (Oracle Magazine September/October 2005 ). Immediately I rushed to implement the article on over developers . The problem is that we have a SQL query using the in operators . For example : select col1,col2 ..coln from table where x in (value1,value2 ….).
    I such a case how can you \use the bind variables technique , which fit the queries in which each variable can have one value (e.g. select country_name
    from hr.countries
    where country_id = :country_id)
    ODP support Oracle spatial or at list using objects??
    Will ODP support oracle spetial???
    Best Regards
    David Itshak
    BSC (Information System), MBA
    .Net developer and Oracle and SQL Server Applicative /Infrastructure DBA
    From: John Cook [[email protected]]
    Sent: &#1497;&#1493;&#1501; &#1513;&#1500;&#1497;&#1513;&#1497; 11 &#1488;&#1493;&#1511;&#1496;&#1493;&#1489;&#1512; 2005 4:15
    To: Ischack David
    Subject: Re: Some questions about bind variables , objects , Oracle spatialand ODP
    The situation you have described with multiple bind values is one I have considered. It's a problem. I think I can code a generic implementation, but doing so would take time away from activities that I get paid for.
    I haven't worked with Oracle Spatial.
    We'll have more articles on ODP.NET in the months ahead. I'm glad you liked Mark's article.
    ----- Original Message -----
    From: "Ischack David"
    To: [email protected]
    Subject: Some questions about bind variables , objects , Oracle spatial and ODP
    Date: Sun, 9 Oct 2005 23:27:24 +0200
    Some questions about bind variables , objects , Oracle spatial and ODP
    Hi

    Hi
    I have read happily the article The Values That Bind By Mark A. Williams (Oracle Magazine September/October 2005 ). Immediately I rushed to implement the article on over developers . The problem is that we have a SQL query using the in operators . For example : select col1,col2 ..coln from table where x in (value1,value2 ….).
    I such a case how can you \use the bind variables technique , which fit the queries in which each variable can have one value (e.g. select country_name
    from hr.countries
    where country_id = :country_id)
    I asked the following questions:
    ODP support Oracle spatial or at list using objects??
    Will ODP support oracle spetial???
    The answer are listed below.
    I tried using ODP bind variables technique using fixed array size and bind variables technique in ODP (the redundant vars were fulfilled with dummy values) . I used trace and tkprof (with SYS=NO) opposite oracle 9.2.0.5 and pare was equal to parse an fetch meaning : no reuse of execution plans.
    Do you have any IDEA????
    Best Regards
    David Yitzhak
    BSC (Information System), MBA
    .Net developer and Oracle and SQL Server Applicative /Infrastructure DBA
    From: Alex Keh [[email protected]]
    Sent: &#1497;&#1493;&#1501; &#1513;&#1504;&#1497; 10 &#1488;&#1493;&#1511;&#1496;&#1493;&#1489;&#1512; 2005 23:50
    To: Ischack David; [email protected]
    Subject: Re: Securing a .NET Application on the Oracle Database
    David,
    In your example ("select col1,col2 ..coln from table where x in (value1,value2 ….)"), x is the name of a column, which does not need to have a bind variable. You can just put in a .NET variable representing the string value of the column name and concatenate the SQL statement together.
    We are planning to supprt objects and VARRAYs around January/February. From these, you can build your own Spatial data types. Today, most .NET Spatial users employ XML when using their Spatial data in .NET.
    Alex
    ----- Original Message -----
    From: Ischack David
    To: [email protected]
    Sent: Sunday, October 09, 2005 2:27 PM
    Subject: Securing a .NET Application on the Oracle Database
    Some questions about bind variables , objects , Oracle spatial and ODP
    Hi
    I have read happily the article The Values That Bind By Mark A. Williams (Oracle Magazine September/October 2005 ). Immediately I rushed to implement the article on over developers . The problem is that we have a SQL query using the in operators . For example : select col1,col2 ..coln from table where x in (value1,value2 ….).
    I such a case how can you \use the bind variables technique , which fit the queries in which each variable can have one value (e.g. select country_name
    from hr.countries
    where country_id = :country_id)
    ODP support Oracle spatial or at list using objects??
    Will ODP support oracle spetial???
    Best Regards
    David Itshak
    BSC (Information System), MBA
    .Net developer and Oracle and SQL Server Applicative /Infrastructure DBA
    From: John Cook [[email protected]]
    Sent: &#1497;&#1493;&#1501; &#1513;&#1500;&#1497;&#1513;&#1497; 11 &#1488;&#1493;&#1511;&#1496;&#1493;&#1489;&#1512; 2005 4:15
    To: Ischack David
    Subject: Re: Some questions about bind variables , objects , Oracle spatialand ODP
    The situation you have described with multiple bind values is one I have considered. It's a problem. I think I can code a generic implementation, but doing so would take time away from activities that I get paid for.
    I haven't worked with Oracle Spatial.
    We'll have more articles on ODP.NET in the months ahead. I'm glad you liked Mark's article.
    ----- Original Message -----
    From: "Ischack David"
    To: [email protected]
    Subject: Some questions about bind variables , objects , Oracle spatial and ODP
    Date: Sun, 9 Oct 2005 23:27:24 +0200
    Some questions about bind variables , objects , Oracle spatial and ODP
    Hi

  • Bind variable for date type

    Hello
    I have a question about bind variable.
    I have a simple query which is a stand alone SQL.
    Its simple select
    select a, b , c from table1, table 2
    where table1.g1 = table 2.p1
    and  table1.pnumber like  :var1 || '%'
    and table2.check_date between :var2 and :var3
    This SQL is embedded in another piece of code.
    I have table1.pnumber like  :var1 || '%'
    So even when I do not pass any value for var1, it will run fine because I concatenate a % with it.
    But  my question is how can I do the same for "table2.check_date like :var2 "
    I can not append % with it because then it throws an error.
    How can I modify my SQL so that I can run it without giving any value for var2 and var3.
    I do not want to use an or condition in which I give a default value of date.
    Is there any way to modify the SQL so that I can run it without giving a value for var2 and var3
    Thanks

    var var2 varchar2(11)
    var var3 varchar2(11)
    EXEC :VAR2 := '01-JUN-1981'
    PL/SQL procedure successfully completed.
    EXEC :VAR3 := '30-JUN-1981'
    PL/SQL procedure successfully completed.
    select * from emp
         where nvl2(:var2,hiredate,to_date('01-JAN-2000','DD-MON-YYYY')) between
         nvl(to_date(:var2,'DD-MON-YYYY'),to_date('01-JAN-2000','DD-MON-YYYY'))
         AND
         nvl(to_date(:var3,'DD-MON-YYYY'),to_date('01-JAN-2000','DD-MON-YYYY'))
    EMPNO ENAME      JOB             MGR HIREDATE        SAL      COMM    DEPTNO
    7782 CLARK      MANAGER        7839 09-JUN-81      2450       100        10
    EXEC :VAR2 := NULL
    PL/SQL procedure successfully completed.
    EXEC :VAR3 := NULL
    PL/SQL procedure successfully completed.
    EMPNO ENAME      JOB             MGR HIREDATE        SAL      COMM    DEPTNO
    7782 CLARK      MANAGER        7839 09-JUN-81      2450       100        10
    7839 KING         PRESIDENT           17-NOV-81      5000       100        10
    7934 MILLER     CLERK          7782 23-JAN-82      1300       100        10
    7566 JONES      MANAGER        7839 02-APR-81                            20
    7902 FORD       ANALYST        7566 03-DEC-81                            20
    7876 ADAMS     CLERK          7788 12-JAN-83                            20
    7369 SMITH      CLERK          7902 17-DEC-80                            20
    7788 SCOTT      ANALYST        7566 09-DEC-82                            20
    7521 WARD       SALESMAN       7698 22-FEB-81                            30
    7844 TURNER     SALESMAN       7698 08-SEP-81                            30
    7499 ALLEN      SALESMAN       7698 20-FEB-81                            30
    7900 JAMES      CLERK          7698 03-DEC-81                            30
    7698 BLAKE      SALESMAN       7839 01-MAY-81                            30
    7654 MARTIN     SALESMAN       7698 28-SEP-81                            30
    Message was edited by: Priyasagi

  • Question about session variables and binding

    Hi All,
    I'm a newbie with Application Express. I've gone through several tutorials and a book, and now I'm actually getting started with apex. My first adventure is a tiny little form, where all you do is fill it out and it sends an email. Pretty simple.
    And, i have it working just fine - but I have a question about something I don't quite understand. Basically, I am generating the email text in a page process. And some of the form fields work fine if i reference them as *:ACCT_NAME*, but some give me the dreaded "not all variables bound" error. For the ones that give me the error, I can reference them like V('ACCT_NAME').
    So, as a newbie, I'm a little confused. When is it appropriate to use the V function, and when it is appropriate to use binding? Why would one of the fields work with binding but not another from the same form?
    Thanks for any clarification you can offer,
    Lisa

    Lisa,
    A bind variable is a place holder variable available in an environment.It is used quite frequently(outside Apex Context) in SQL and PLSQL scripts and especially in Dynamic SQL statements.Many times using a bind variable gives better performance. In the Apex environment,page items and many other variables related to the session are available as bind variables and hence their value can be referred in SQL,PLSQL contexts as :VARIABLE_NAME.
    Now V() function is an apex specific function which returns the value of an apex session variable outside the apex environment. So as Machaan pointed out, it is used in
    procedures and triggers that gets called from within an apex session. This is required since the bind variables themselves are not directly available in the SQL environment but their values from the corresponding session can be accessed by this apex built-in function.
    The length of any Bind variable name is limited to 30 characters, this is a limitation inherited from Oracle SQL itself and hence session variables(page or application items) whose name has a length which exceeds 30 characters cannot be used as the :ITEM_NAME format. In such cases you would have to use the v() method again. This might be happening in your case.

  • Question on VO bind variable ?

    Hi,
    In one of my VO query's Select part, Im calling a function which accepts a parameter that comes from the pageContext
    eg: select abc(:1) from xyz;
    Any ideas on how to set the bind variable in the select clause of the VO query?
    Thanks!!

    I had tried the setWhereClauseParam today and could not get it to work. I used a PL/SQL function in my VO, and it was reading :3 as a string value. I would like to know which method user550094 was able to use.
    If I see this in an Oracle-delivered VO, I'll reverse engineer to see which method they are using.
    - Oracle Hack

  • How to get binding variables from request

    We are trying to use html-db to develop an application which need to get values from user request to use in the queries, i.e. we will have pages depend on several binding variables and the value of these variables will be provided by the user through get/post request. Because the request will be initialed by another application so to use a form to collect the values is not an option.
    I am a html-db newbie. Does anyone here know how to do that?

    you're right in thinking this is a bit of a newbie html db question. it's a pretty straightforward matter to set up a report in html db that runs off of bind variables that can be set from a URL. you can see a pretty simple example on the first page of our "Sample Application" that's available to install into your workspace. try taking a look at that to see what i mean. you can install the Sample Application by clicking the "Review Demonstration Applications" link that's available right after logging into htmldb.oracle.com. that resulting screen lets you create (or re-create) the Sample App in your workspace. once it's installed, take a look at how the report on page 1 calls the first report on page 201. that report on 201 is dependent on a bind variable, :P202_CATEGORY, that's set from the URL. this particular URL is generated from the report on page 1, but it could just as easily have been generated from your other application. when you look at this example, the two key points to pay attention to are the 1) syntax used in the URL to set the bind variable (which is explained in our online help at http://htmldb.oracle.com/i/doc/mvl_fund005.htm#sthref357) and 2)the way in which that bind variable is referenced in the first sql query region on page 201. take a look at those when you get a chance, and let us know if you have further questions.
    thanks,
    raj

  • Can viewObject get a parameter from sessionScope to binding variable?

    hello,
    using Jdev11g ADF Fusion application
    Can viewObject get a parameter from sessionScope and assign into binding variable ? without using executeWithParameter
    Thanks
    greenApple

    A. Safwat,
    As I said before, I was not trying to be offensive, but simply to explain some of the shortcomings of one solution over another. One of the reasons people give such short answers is that many questions (including this one) have been asked and answered many many many times before on the forum. As to my reasons:
    1). Overkill - overkill because you are writing code to do what the framework already provides for you.
    2). Not bind-variable friendly - you are gluing in literals into a SQL statement. That means that Oracle will have to hard parse the query for each new value of the filter clause, yielding to poor performance, particularly in a multiuser environment. It should ideally be done using bind variables.
    3). Insecure (think about what happens if you put "'xyz' or 1=1" into the filterValue there) - not using bind variables is a security hole. Think through what happens if a filter criteria comes through like the one I mentioned.
    4). Inflexible - because you are overriding executeQueryForCollection, this VO becomes inflexible and can only be used in this particular place. Using the declarative approach outlined by Timo is more flexible
    5). Bad (ok, that's my opinion there) - OK, perhaps this was a bit offensive ;)
    Please don't take a critique of a post as offensive, as I assure you it was not intended to be in that spirit. As I mentioned, I greatly appreciate when people point out issues/problems/etc with my ideas, as that is the best way for me to learn. I have in the past written applications that were not bind-variable friendly, and I learned the downsides the hard way (system was horribly non-performant) - I wish someone had reviewed my approach and told me "bad idea" before the application made it into production.
    Respectfully,
    John

  • Report Using Bind Variables

    Hey Everyone,
    I'm having a bit of trouble creating a report. I need the FROM part of the code to use bind variables. I have come up with this peice of code below but im getting the following error:
    failed to parse SQL query:
    ORA-06550: line 1, column 8:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    begin function package pragma procedure subtype type use
    form
    current cursor
    The symbol "" was ignored.
    ORA-06550: line 2, column 24:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    begin function package pragma procedure subtype type use
    form
    current
    Can anyone see where im going wrong?
    Thanks in advance,
    -N.S.N.O.
    Code*
    DECLARE
    x VARCHAR2 (4000);
    BEGIN
    x := x || 'select *';
    x := x || 'from ';
    x := x || :p13_schema;
    x := x || '.ddl_log@';
    x := x || :p13_db_name;
    x := x || '_DBAAPEX.TNTEWW.COM';
    RETURN (x);
    END;

    Hey Roel and Daylocks,
    After getting frustrated for a while i deleted the page and started again. I put in the exact same code and it worked just how i wanted in the first place :S
    The only thing i did different is when i was creating the report region the first time around i used a normal SQL query, For Example:
    select sysdate from dual;
    Then i modified it to
    DECLARE
    x VARCHAR2 (4000);
    BEGIN
    x := x || 'select ';*
    x := x || 'from ';
    x := x || :p14_schema;
    x := x || '.ddl_log@';
    x := x || :p14_db_name;
    x := x || '_DBAAPEX.TNTEWW.COM';
    RETURN (x);
    END;
    Whereas on the second attempt i used the peice of code in question straight away. Its been a bit of a frustrating morning because i used a similar peice of code for a different application, nevermind tho :)
    Thanks for your replys, much appreciated.
    -N.S.N.O.

  • VO with bind variable defined in SQL is not updated correctly

    Hi Experts,
    I have one simple question here, could you please help answer? Thanks a lot!
    I have 2 pages, the first page displays an employee table, the second page shows some details related to the selected employee. When select one employee and click on the detail button I can be naviaged to the second page and see the details for the selected employee. The vo used on the second page uses a bind variable called "empId" which is binding to a pageFlowScope value 'adf.context.pageFlowScope.empId', and this pageFlowScope value will be populated to the selected empId in detail button actionListener at runtime).
    The question here is, now the first navigating is ok, the detail page can show the correct information for the employee selected on the employee page, but when navigating back and choosing another employee, and then click on the detail button again, the detail page is NOT updated, it still shows the first selected employee information. I do debug the actionListener in the backing bean and the second selected empId does get passed to pageFlowScope.empId, the bind variable in the VO should get the new value, right? but why the second page does not get updated (query using the new bind variable value)?
    Thanks!
    Edited by: user774592 on Jul 20, 2011 11:13 PM
    Edited by: user774592 on Jul 20, 2011 11:15 PM
    Edited by: user774592 on Jul 20, 2011 11:15 PM

    Hi Timo,
    Thanks for you response! The JDev version I used is 11.1.2.0.0. Actually, they are different VOs, the 1st page is EmployeeVO, the second page is ResourceSummaryVO which binds the empId variable in SQL. The ActionListener code is as below.
    public void viewResSummary(ActionEvent actionEvent) {
    // Add event code here...
    DCBindingContainer bc = (DCBindingContainer)this.getBindings();
    DCIteratorBinding empIteBinding =
    bc.findIteratorBinding("SEmployeeView1Iterator");
    //Get employee id from the current selected employee record
    Row currentRow = empIteBinding.getRowSetIterator().getCurrentRow();
    Long employeeId = ((DBSequence)currentRow.getAttribute("EmployeeId")).getValue();
    //Set employeeId as a pageFlowScope object which will be used in ResourceSummaryPage
    AdfFacesContext.getCurrentInstance().getPageFlowScope().put("empId", employeeId);
    empId is defined using Bind Variable Dialog and is referenced in ResourceSummaryVO on the second page. I used the EL expression to defined its value to adf.context.pageFlowScope.empId which will be populated using above code at runtime.
    Again, thanks for your help!

  • Problem with bind variable in a procedure

    Hi Experts,
    I'm migrating forms from 5 to 6i. And in most of the forms I'm getting the error in the procedure "G$_KEY_OPT_MENU".
    This is the most common error I'm getting in almost like 30 forms.
    The error is:
    Error 49 at line 21, column 3
    bad bind variable "SELECT_ITEM"
    Error 49 at line 22, column 3
    bad bind variable "SELECT_ITEM"
    Error 49 at line 21, column 3
    bad bind variable "OPT_SEL"
    Error 49 at line 21, column 3
    bad bind variable "OPT_SEL"
    Error 49 at line 50, column 3
    bad bind variable "SELECT_ITEM"
    PROCEDURE G$_KEY_OPT_MENU (ITEM_NAME_IN IN CHAR,
                               SEL_A_DESC IN CHAR,SEL_A_KEY IN CHAR,
                               SEL_B_DESC IN CHAR,SEL_B_KEY IN CHAR,
                               SEL_C_DESC IN CHAR,SEL_C_KEY IN CHAR,
                               SEL_D_DESC IN CHAR,SEL_D_KEY IN CHAR) IS
         ITM          VARCHAR2(1);
         DESC_VAR     VARCHAR2(36);
         KEY_VAR      VARCHAR2(30);
         ITEM_ID      ITEM;
    BEGIN
      ITEM_ID := FIND_ITEM(NAME_IN('SYSTEM.CURSOR_BLOCK')||
                   SUBSTR(NAME_IN('SYSTEM.TRIGGER_ITEM'),
                   INSTR(NAME_IN('SYSTEM.TRIGGER_ITEM'),'.'),
                   INSTR(NAME_IN('SYSTEM.TRIGGER_ITEM'),'_LBT')-1 -
                   INSTR(NAME_IN('SYSTEM.TRIGGER_ITEM'),'.')+1));
      IF ID_NULL(ITEM_ID) THEN
         IF G$_DISPLAY_ALERT('','The Button you pressed is outside the current block') IS NOT NULL
            THEN RAISE FORM_TRIGGER_FAILURE;
         END IF;
      END IF;
      :SELECT_ITEM := '';
      :OPT_SEL := '';
      For Loop and some conditions, setting properties.
      GO_ITEM('G$_OPT_BLOCK.OPT_SEL');
      :SELECT_ITEM := ITEM_NAME_IN;
    END;Edited by: user12290512 on Mar 14, 2011 2:16 PM

    FRM-18108: Failed to load the following objects.Source Module:GOQOLIB
    Source Object: G$_WARNING_ALERT
    Source Module:GOQOLIB
    Source Object: G$_OPT_BLOCK
    Source Module:GOQOLIB
    Source Object: G$_OPT_CANVAS
    Source Module:COQOLIB
    Source Object: CTRDETC_CHG_LOV
    Source Module:GOQOLIB
    Source Object: GUROPTM_LOV
    Source Module:COQOLIB
    Source Object: CTRDETC_PMT_LOV
    Source Module:COQOLIB
    Source Object: CBBDACC_ACCOUNT_ID_LOV
    Source Module:COQOLIB
    Source Object: CBBDACC_ACCOUNT_ID_RG
    Source Module:COQOLIB
    Source Object: CTRDETC_PMT_RG
    Source Module:COQOLIB
    Source Object: CTRDETC_CHG_RG
    Source Module:GOQOLIB
    Source Object: GUROPTM_RG
    Source Module:GOQOLIB
    Source Object: G$_NVA_LOV
    Source Module:GOQOLIB
    Source Object: G$_NVA_BUTTON_ITEM
    Source Module:GOQOLIB
    Source Object: G$_NVA_TEXT_ITEM
    Source Module:GOQOLIB
    Source Object: G$_OPT_WINDOW
    And all the source objects listed above are in GOQOLIB form. >
    This is "KEY" piece of information that should have been included in your original post. As you are fairly new to the Oracle Forums, you might want to take a few minutes to review the following:
    <ul>
    <li>Before posting on this forum please read
    <li>10 Commandments for the OTN Forums Member
    <li>Announcement: Forums Etiquette / Reward Points
    </ul>
    These threads will help you ask more thorough questions! The more information you can provide about the issue you are having the better able we (the community) are to give you a solution. ;-)
    Craig B-)
    Edited by: CraigB on Mar 15, 2011 9:27 AM

  • Problem with Bind Variable in 11.2

    Hi
    I have a slow statement with bind Variables. With literals it works fine. Is there a way to replace the bind by literal in advanced ? I use Release 11.2.0.2.3
    Thank you

    904062 wrote:
    I have a slow statement with bind Variables. With literals it works fine. Is there a way to replace the bind by literal in advanced ? I use Release 11.2.0.2.3This specific scenario is very much an exception to the rule - and you need to back your statement up with execution plans of the SQL with bind variables and with literals, and run stats that show the difference between these two execution plans.
    See the {message:id=9360003} from the {forum:id=75} forum's FAQ for details on how to post a SQL performance tuning question.

  • Collection with bind variable

    Hello all,
    this might be more of a pl sql question but I am trying to create a collection in apex where the query uses a bind variable. I cannot get this query to work.
    This works
    p_query => 'select je_batch_id from gl_je_batches where default_period_name = ''MAY-10''',
    but I cannot get it to work with a bind variable.
    p_query => 'select je_batch_id from gl_je_batches where default_period_name = :P14_EPSB_ARGYLL_PERIODS ||',
    any assistance would be greatly appreciated.
    Thanks

    For the record, the APEX_COLLECTION package in Application Express 4.0 now does support bind variables in the query.
    APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY_B and APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERYB2 support an input array of bind variable names and bind variable values. This should be faster than referencing an item value via the v() function. However, prior to APEX 4.0, this is the only recourse.
    Joel

Maybe you are looking for

  • How Can I see the BlockDiagram of a password protected VI

    I need to modify some VI but I can to open the Block Diagram because are password protected. I can to find into the forum tahn can help. Any body has an I dea how? Thanks

  • Question on IDoc and RFC

    Hi Folks,   I have few questions on SAP XI. 1) For IDoc and RFC, why we need to import the metadata again even though we import RFC and IDoc in intergration Repository? 2) Why we don't need to create Message interface and Message type for IDoc and RF

  • Another system freeze thread

    My apologies in advance on the possible redundancy... I'm a long time Mac user (1985 & a little Fat Mac), and I've never been discouraged with a problem such as this. I don't claim to be an expert, but I've seen alot through the years. I've had my G5

  • Need a help with the VSFB requirement type

    Hi , As i am using the requirement type in the PIr creation , PIR is generate the MRP run & the planned order generate for this , in between one production order reservation came for some qty  but , it is not cosumed the PIR ? Could you please explai

  • Automatic Junk Deposits After TechTool??

    This is weird. As a precaution -- so much for that -- I ran the new TechTool Deluxe to get a fix on my G5's sitrep. Everything checked out -- I wish I had the report -- but the tool wanted to "fix" 8,000-plus "errors," probably in file structure, or