Warning: No indices selected for this bind variable ??

I have a view object that is read-only and performs a JDBC connection to SQL 2000 server to get the contents of a view in the database. I need to add a couple of bind variables that I can use for searching 'ExecuteWithParams' in my JSF.
When I click 'Add' to add a bind variable, I get the subject warning. My query has the selected attributes with 'AS Emp_No' for instance. If I want to add to the where clause 'AND EMP_NO = :EmpIdVar' as I would do in the Oracle way, how can I do it in the JDBC Positional way and avoid the warning above?
Thanks!

Bug 6041448 details a problem with setting the index positions of a named bind variable when the View Object's binding style is "Oracle Positional" or "JDBC Positional".
The workaround involves not using named bind variables, and just using the ? bind variable indicators in the query without formally defining the named bind variables.
You could adopt a technique like the one described in section "10.5.2 How to Work with Named View Object Bind Variables" of the ADF Developer's Guide for Forms/4GL Developers on the ADF Learning Center (at http://www.oracle.com/technology/products/adf/learnadf.html) as an alternative to using ExecuteWithParams [whose use required named bind parameters]. Instead, you would write a custom method on your view object that accepts your two parameters, then inside this method it would set the correct posititional parameters using setWhereClauseParam().
Once you've added the custom method to the view object's client interface, then you can drop the custom method from the data control palette just like the ExecuteWithParams and use it in basically the same ways.

Similar Messages

  • Error with clob column: "No pl/sql translation for the blind type given for this bind variable"

    This is reports 11g
    I've got a clob column. Reports seems to recognize its type, but if I try to reference it in a format trigger, I get this error at compile time:
    "No pl/sql translation for the blind type given for this bind variable"

    Actually, Reports is in something better than Forms.
    Neither Forms nor Reports do not have "complete" SQL engine (both have only "complete" PL/SQL engine), but have their own SQL parser, which does not understand SQL commands after the database 8.0.
    But, in Reports Data Model - SQL Query Statement, we can write "modern" SQL statement (> database 8.0), because Reports sent it directly to the database, without using their own SQL parser.
    For example, in Reports Data Model - SQL Query Statement, we can write this (scalar subquery expressions, in bold):
    select empno,
           ename,
           deptno,
           (select dname from dept where deptno = emp.deptno) dname
      from emp
    order by empno;
    although scalar subquery expressions was introduced in the database 9.0.1, and in databases 8.0 and 8.1 we should write someting like this:
    select emp.empno,
           emp.ename,
           emp.deptno,
           dept.dname
      from emp,
           dept
    where dept.deptno = emp.deptno
    order by empno;
    Regards,
    Zlatko

  • Invalid Identifier for a bind variable

    I am running a sql query and am using bind variables for dates. Running the querry and after putting values for the bind variable I get a message invalid identifier. Could any one help me and tell me what I am doing wrong.
    1 SELECT D.NAME_LAST||', '||D.NAME_FIRST DEBTOR,
    2 F.CDCS_NBR,
    3 F.CDCS_SEQ,
    4 F.POSTING_DATE,
    5 F.PAYMENT_AMOUNT,
    6 ( GREATEST ( NVL ( F.ACCRUED_INT_CAP, 0 ), NVL ( F.ACCRUED_INTEREST, 0 ) )
    7 + NVL ( F.ACCRUED_FINE_INTEREST, 0 ) )
    8 ACCRUED_INT_CAP,
    9 DECODE(CLASS,'V', RUN_INTEREST,'R',(RUN_FINE_INTEREST + RUN_INT_CAP)) RUN_INTEREST
    10 FROM TA_DEBT_DEBTOR_LIAB_VW D,
    11 TA_FINANCE F
    12 WHERE F.POSTING_DATE BETWEEN TO_DATE(&A, 'DD-MON-YYYY') AND
    13 TO_DATE(&B, 'DD-MON-YYYY')
    14 AND
    15 F.FINANCE_CODE = 'PMNT'
    16 AND F.PAYMENT_AMOUNT <
    17 ( GREATEST ( NVL ( F.ACCRUED_INT_CAP, 0 ), NVL ( F.ACCRUED_INTEREST, 0 ) )
    18 + NVL ( F.ACCRUED_FINE_INTEREST, 0 ) )
    19 AND F.DEBTORID = D.DEBTORID
    20 AND F.CDCS_NBR = D.CDCS_NBR
    21 AND F.CDCS_SEQ = D.CDCS_SEQ
    22* ORDER BY D.NAME_LAST, D.NAME_FIRST
    SQL> /
    Enter value for a: 10-JAN-2003
    old 12: WHERE F.POSTING_DATE BETWEEN TO_DATE(&A, 'DD-MON-YYYY') AND
    new 12: WHERE F.POSTING_DATE BETWEEN TO_DATE(10-JAN-2003, 'DD-MON-YYYY') AND
    Enter value for b: 10-JUN-2006
    old 13: TO_DATE(&B, 'DD-MON-YYYY')
    new 13: TO_DATE(10-JUN-2006, 'DD-MON-YYYY')
    TO_DATE(10-JUN-2006, 'DD-MON-YYYY')
    ERROR at line 13:
    ORA-00904: "JUN": invalid identifier

    Replace this line...
    12 WHERE F.POSTING_DATE BETWEEN TO_DATE(&A, 'DD-MON-YYYY') AND
    with...
    12 WHERE F.POSTING_DATE BETWEEN TO_DATE('&A', 'DD-MON-YYYY') AND

  • How to fix different execution plan for different bind variable values?

    Please find the below query. The execution plan is fine. The problem That I am facing is in some cases for different bind variable values execution plan gets changed and degrades performance. I have used 6 tables here and all of the tables have histogram on all columns. Database version is Oracle 10g and the value of method_opt is 'For all columns size auto'
    SELECT l.LineNumber INTO :b0
    FROM Lines l ,LineVersions lv ,Statuses s
    WHERE (((((((((((l.serviceContractId=:b1 AND l.LineId<>:b2)
    AND lv.LineId=l.LineId) AND lv.StatusId=s.StatusId)
    AND s.Code IN ('EPR','ERE','EEP','ERP','PRP','PRD','AAC'))
    AND NOT (s.CODE='AAC' AND lv.activeto<TO_DATE(:b3,:b4)))
    AND lv.EquipmentDetailId=:b5) AND lv.RouteDetailId=:b6)
    AND (lv.cargoDetailId=:b7 OR lv.cargoDetailId IN
    (SELECT i_cd1.cargoDetailId
    FROM CargoDetails i_cd1 ,CargoDetails i_cd2 ,CargoCommodities i_cc1 ,
    CargoCommodities i_cc2 WHERE
    ((((((i_cd2.cargoDetailId=:b7 AND i_cd1.cargoDetailId<>:b7)
    AND i_cd1.ServiceContractId=:b1) AND i_cd1.cargoTypeId=i_cd2.cargoTypeId)
    AND i_cc1.cargoDetailId=i_cd1.cargoDetailId)
    AND i_cc2.cargoDetailId=i_cd2.cargoDetailId)
    AND i_cc1.commodityId=i_cc2.commodityId))))
    AND ((lv.customerGroupId IS NULL AND :b11=0) OR lv.customerGroupId IN
    (SELECT cgm1.customerGroupId
    FROM CustomerGroupMembers cgm1 ,CustomerGroupMembers cgm2 ,CustomerGroups cg1
    WHERE (((cgm2.customerGroupId=:b11 AND cgm1.customerNoId=cgm2.customerNoId)
    AND cg1.CustomerGroupId=cgm1.CustomerGroupId)
    AND cg1.ServiceContractId=l.ServiceContractId)))) AND lv.linetype='C')
    AND ROWNUM=1)
    After searching in several blogs I have found the below solutions. Please see it and let me know it is correct or not
    Solution 1:-Get rid of histogram that does nothing but messes up execution plan by giving below command
    exec dbms_stats.gather_table_stats(owner, tablename, method_opt => 'for all columns size 1', cascade => true);
    As 6 tables are there I need to execute above command 6 times.
    Solution 2:- Use stored outline. Not sure how to get the best execution plan.
    I am looking for answers ASAP. Thanks in advance

    As you have probably read, bind variables and histograms do not mix well.
    Histograms suggest that you have skew in your data such that different values should get different plans
    Bind variables exist so that SQL with different supplied values can be shared.
    Mix the two together and at parse time with bind variable peeking you get plans for specific values shared for all values.
    The solutions you have mentioned are the common approaches, together with a third - use literals not binds if you've got data skew (i.e. your histograms are justified) and don't want shared SQL.
    I would have thought that getting rid of some of these histograms may be the right approach if you're none of your application SQL is using literals to benefit from them.
    Can you confirm your version of Oracle.
    Further reading:
    http://jonathanlewis.wordpress.com/2009/05/06/philosophy-1/
    http://structureddata.org/2008/03/26/choosing-an-optimal-stats-gathering-strategy/
    http://richardfoote.wordpress.com/2008/01/04/dbms_stats-method_opt-default-behaviour-changed-in-10g-be-careful/

  • ArrayBindSize-implicit (-1) length not valid for this bind or define dataty

    Hello all,
    This has been troubling me for a couple of days.
    I am retriving an oracle type of varchar2 table:
    TYPE VARCHAR2_TABLE IS TABLE OF VARCHAR2(4000) INDEX BY BINARY_INTEGER;
    I create the following array:
    'size of the array
    Dim intValue(4000) As Integer
    Dim idx As Integer = 0
    While idx < intValue.Length
    'assingning 4000 tells that each row size
    'will be of 4000 characters
    intValue(idx) = 4000
    idx = idx + 1
    End While
    Then I assign it to the parameter:
    Dim param As OracleParameter = cmd.Parameters.Add("sBuffer", OracleDbType.Varchar2)
    param.Direction = ParameterDirection.Output
    param.Size = intValue.Length
    param.CollectionType = OracleCollectionType.PLSQLAssociativeArray
    param.ArrayBindSize = intValue
    when I execute the query I get the error:
    implicit (-1) length not valid for this bind or define datatype
    However, if i assign each row the size of 2000 or less it returns fine. But this limits me to getting only 2000 characters. And our current system returns 4000 characters.
    If any one has a solution, please post it.
    thanks,
    Dhaval

    Ok I've now found the patchsets and have ODP.NET 9.2.0.420 up and running - which is a start!
    The 2000 character limit as discussed above does indeed seem to have gone - great! BUT: I'm now running into another limit:
    It seems as though ODP.NEt and/or the layers below reserve 3 bytes of memory for every character when binding a PLSQLAssociativeArray OUTPUT parameter. Due to what looks like the old 16Mb-per-array limit I used to encounter when using Microsoft OLEDB Provider for Oracle, this means that, for an array of VARCHAR2(4000), the maximum number of rows (array elements) I can get back is 1398, before I get an exception with the message:
    "ORA-01044: size 16788000 of buffer bound to variable exceeds maximum 16777216 occured"
    When using the Microsoft OLEDB Provider there seems to be a 1-byte-per-character sizing going on, since I can get up to 4194 rows (array elements) back from the same stored procedure.
    Any reasoning behind the 3-bytes per character with ODP.NET?

  • While running dcdiag /test:dns getting Warning: The AAAA record for this DC was not found

    DCDIAG /test:dns result is pested here.
    C:\Users\administrator.SUD>dcdiag /test:dns
    Directory Server Diagnosis
    Performing initial setup:
       Trying to find home server...
       Home Server = MUM-ADS-01
       * Identified AD Forest.
       Done gathering initial info.
    Doing initial required tests
       Testing server: Default-First-Site-Name\MUM-ADS-01
          Starting test: Connectivity
             ......................... MUM-ADS-01 passed test Connectivity
    Doing primary tests
       Testing server: Default-First-Site-Name\MUM-ADS-01
          Starting test: DNS
             DNS Tests are running and not hung. Please wait a few minutes...
             ......................... MUM-ADS-01 passed test DNS
       Running partition tests on : ForestDnsZones
       Running partition tests on : DomainDnsZones
       Running partition tests on : Schema
       Running partition tests on : Configuration
       Running partition tests on : sud
       Running enterprise tests on : sud.in
          Starting test: DNS
             Test results for domain controllers:
                DC: MUM-ADS-01.sud.in
                Domain: sud.in
                   TEST: Basic (Basc)
                      Warning: The AAAA record for this DC was not found
                   TEST: Forwarders/Root hints (Forw)
                      Error: Root hints list has invalid root hint server:
                      a.root-servers.net. (198.41.0.4)
                      Error: Root hints list has invalid root hint server:
                      b.root-servers.net. (128.9.0.107)
                      Error: Root hints list has invalid root hint server:
                      c.root-servers.net. (192.33.4.12)
                      Error: Root hints list has invalid root hint server:
                      d.root-servers.net. (128.8.10.90)
                      Error: Root hints list has invalid root hint server:
                      e.root-servers.net. (192.203.230.10)
                      Error: Root hints list has invalid root hint server:
                      f.root-servers.net. (192.5.5.241)
                      Error: Root hints list has invalid root hint server:
                      g.root-servers.net. (192.112.36.4)
                      Error: Root hints list has invalid root hint server:
                      h.root-servers.net. (128.63.2.53)
                      Error: Root hints list has invalid root hint server:
                      i.root-servers.net. (192.36.148.17)
                      Error: Root hints list has invalid root hint server:
                      j.root-servers.net. (192.58.128.30)
                      Error: Root hints list has invalid root hint server:
                      k.root-servers.net. (193.0.14.129)
                      Error: Root hints list has invalid root hint server:
                      l.root-servers.net. (198.32.64.12)
                      Error: Root hints list has invalid root hint server:
                      m.root-servers.net. (202.12.27.33)
                   TEST: Delegations (Del)
                      Error: DNS server: sud-ad.sud.in. IP:<Unavailable>
                      [Missing glue A record]
                   TEST: Records registration (RReg)
                      Network Adapter
                      [00000006] Intel(R) PRO/1000 MT Network Connection:
                         Warning:
                         Missing AAAA record at DNS server 10.1.6.132:
                         MUM-ADS-01.sud.in
                         Warning:
                         Missing AAAA record at DNS server 10.1.6.132:
                         gc._msdcs.sud.in
                         Warning:
                         Missing AAAA record at DNS server 10.1.6.133:
                         MUM-ADS-01.sud.in
                         Warning:
                         Missing AAAA record at DNS server 10.1.6.133:
                         gc._msdcs.sud.in
                   Warning: Record Registrations not found in some network adapters
             Summary of test results for DNS servers used by the above domain
             controllers:
                DNS server: 128.63.2.53 (h.root-servers.net.)
                   1 test failure on this DNS server
                   PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DN
    S server 128.63.2.53
                DNS server: 128.8.10.90 (d.root-servers.net.)
                   1 test failure on this DNS server
                   PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DN
    S server 128.8.10.90
                DNS server: 128.9.0.107 (b.root-servers.net.)
                   1 test failure on this DNS server
                   PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DN
    S server 128.9.0.107
                DNS server: 192.112.36.4 (g.root-servers.net.)
                   1 test failure on this DNS server
                   PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DN
    S server 192.112.36.4
                DNS server: 192.203.230.10 (e.root-servers.net.)
                   1 test failure on this DNS server
                   PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DN
    S server 192.203.230.10
                DNS server: 192.33.4.12 (c.root-servers.net.)
                   1 test failure on this DNS server
                   PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DN
    S server 192.33.4.12
                DNS server: 192.36.148.17 (i.root-servers.net.)
                   1 test failure on this DNS server
                   PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DN
    S server 192.36.148.17
                DNS server: 192.5.5.241 (f.root-servers.net.)
                   1 test failure on this DNS server
                   PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DN
    S server 192.5.5.241
                DNS server: 192.58.128.30 (j.root-servers.net.)
                   1 test failure on this DNS server
                   PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DN
    S server 192.58.128.30
                DNS server: 193.0.14.129 (k.root-servers.net.)
                   1 test failure on this DNS server
                   PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DN
    S server 193.0.14.129
                DNS server: 198.32.64.12 (l.root-servers.net.)
                   1 test failure on this DNS server
                   PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DN
    S server 198.32.64.12
                DNS server: 198.41.0.4 (a.root-servers.net.)
                   1 test failure on this DNS server
                   PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DN
    S server 198.41.0.4
                DNS server: 202.12.27.33 (m.root-servers.net.)
                   1 test failure on this DNS server
                   PTR record query for the 1.0.0.127.in-addr.arpa. failed on the DN
    S server 202.12.27.33
             Summary of DNS test results:
    Auth Basc Forw Del  Dyn  RReg Ext
                Domain: sud.in
                   MUM-ADS-01                   PASS WARN FAIL FAIL PASS WARN n/a
             ......................... sud.in failed test DNS

    Hi Meinolf,
    Please find the IP Details as well as DNS test results.
    C:\Users\Administrator.SCI>dcdiag /test:dns
    Directory Server Diagnosis
    Performing initial setup:
       Trying to find home server...
       Home Server = MDCDCDNS
       * Identified AD Forest.
       Done gathering initial info.
    Doing initial required tests
       Testing server: MDC-Powai\MDCDCDNS
          Starting test: Connectivity
             ......................... MDCDCDNS passed test Connectivity
    Doing primary tests
       Testing server: MDC-Powai\MDCDCDNS
          Starting test: DNS
             DNS Tests are running and not hung. Please wait a few minutes...
     ERROR: NO DNS servers for IPV6 stack was found
             ......................... MDCDCDNS passed test DNS
       Running partition tests on : ForestDnsZones
       Running partition tests on : DomainDnsZones
       Running partition tests on : Schema
       Running partition tests on : Configuration
       Running partition tests on : sci
       Running enterprise tests on : sci.com
          Starting test: DNS
             Test results for domain controllers:
                DC: MDCDCDNS.sci.com
                Domain: sci.com
                   TEST: Basic (Basc)
                      Warning: The AAAA record for this DC was not found
                   TEST: Records registration (RReg)
                      Network Adapter
                      [00000009] Microsoft Virtual Network Switch Adapter:
                         Warning:
                         Missing AAAA record at DNS server 10.64.7.32:
                         MDCDCDNS.sci.com
                         Warning:
                         Missing AAAA record at DNS server 10.64.7.32:
                         gc._msdcs.sci.com
                         Warning:
                         Missing AAAA record at DNS server 10.64.7.35:
                         MDCDCDNS.sci.com
                         Warning:
                         Missing AAAA record at DNS server 10.64.7.35:
                         gc._msdcs.sci.com
                         Warning:
                         Missing AAAA record at DNS server 10.20.33.72:
                         MDCDCDNS.sci.com
                         Warning:
                         Missing AAAA record at DNS server 10.20.33.72:
                         gc._msdcs.sci.com
                         Warning:
                         Missing AAAA record at DNS server 10.20.33.71:
                         MDCDCDNS.sci.com
                         Warning:
                         Missing AAAA record at DNS server 10.20.33.71:
                         gc._msdcs.sci.com
                   Warning: Record Registrations not found in some network adapters
                   MDCDCDNS                     PASS WARN PASS PASS PASS WARN n/a
             ......................... sci.com passed test DNS
    C:\Users\Administrator.SCI>ipconfig /all
    Windows IP Configuration
       Host Name . . . . . . . . . . . . : MDCDCDNS
       Primary Dns Suffix  . . . . . . . : sci.com
       Node Type . . . . . . . . . . . . : Hybrid
       IP Routing Enabled. . . . . . . . : No
       WINS Proxy Enabled. . . . . . . . : No
       DNS Suffix Search List. . . . . . : sci.com
    Ethernet adapter Local Area Connection 7:
       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : External Internal Virtual Network
       Physical Address. . . . . . . . . : 00-14-4F-CA-83-AC
       DHCP Enabled. . . . . . . . . . . : No
       Autoconfiguration Enabled . . . . : Yes
       IPv4 Address. . . . . . . . . . . : 10.64.7.32(Preferred)
       Subnet Mask . . . . . . . . . . . : 255.255.255.0
       Default Gateway . . . . . . . . . : 10.64.7.1
       DNS Servers . . . . . . . . . . . : 10.64.7.32
                                           10.64.7.35
                                           10.20.33.72
                                           10.20.33.71
       NetBIOS over Tcpip. . . . . . . . : Disabled
    Ethernet adapter Local Area Connection 6:
       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : TEAM : Team #1
       Physical Address. . . . . . . . . : 00-14-4F-CA-83-AC
       DHCP Enabled. . . . . . . . . . . : Yes
       Autoconfiguration Enabled . . . . : Yes
       Autoconfiguration IPv4 Address. . : 169.254.105.163(Preferred)
       Subnet Mask . . . . . . . . . . . : 255.255.0.0
       Default Gateway . . . . . . . . . :
       NetBIOS over Tcpip. . . . . . . . : Enabled
    Tunnel adapter Local Area Connection* 8:
       Media State . . . . . . . . . . . : Media disconnected
       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : isatap.{2D5A4A27-298F-48E5-A376-EA886EF1E
    42A}
       Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
       DHCP Enabled. . . . . . . . . . . : No
       Autoconfiguration Enabled . . . . : Yes
    Tunnel adapter Local Area Connection* 9:
       Media State . . . . . . . . . . . : Media disconnected
       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : isatap.{14FA7CD4-8B69-4C86-A58B-056793B7D
    901}
       Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
       DHCP Enabled. . . . . . . . . . . : No
       Autoconfiguration Enabled . . . . : Yes
    Please check and revert back for any queries..
    Thanks...
    Deva Self-trust is the first secret of success.

  • An error occurred while applying your dashboard selections for this page???

    Hi there,
    I'm getting this error on the dashboard page.
    "An error occurred while applying your dashboard selections for this page" Error Codes: GV3MWW29
    It is removed when I click "Clear my selection" from page option.
    Is there any other way to remove the error without clicking "Clear My selction" everytime.
    Thanks

    Have you saved your selections by selecting 'Saved Current Selections'? When do you get this error?
    There are a few posts in this forum; here's one that may or may not help; take a look if you haven't already..
    GV3MWW29 error
    Thanks!

  • ORA-02005: implicit (-1) length not valid for this bind or define datatype

    Error received when attempting to login to Portal 3.0.8.9 using Internet Explorer 5.50.4522.1800CO (from Oracle OBI 5.0).
    Error does not occur when using Netscape 4.75. However, Netscape pegs CPU between every Portal page. I must maximize/minimize the Windows Task Manager in order for Netscape to move to next Portal page.
    Both browsers work with other sites.
    ORA-02005: implicit (-1) length not valid for this bind or define datatype
    DAD name: portal30
    PROCEDURE : PORTAL30.home
    URL : http://hostname:port/pls/portal30/portal30.home
    PARAMETERS :
    ============
    ENVIRONMENT:
    ============
    PLSQL_GATEWAY=WebDb
    GATEWAY_IVERSION=2
    SERVER_SOFTWARE=Oracle HTTP Server Powered by Apache/1.3.12 (Win32)
    ApacheJServ/1.1 mod_ssl/2.6.4 OpenSSL/0.9.5a mod_perl/1.24
    GATEWAY_INTERFACE=CGI/1.1
    SERVER_PORT=80
    SERVER_NAME=host
    REQUEST_METHOD=GET
    QUERY_STRING=
    PATH_INFO=/pls/portal30/PORTAL30.home
    SCRIPT_NAME=/pls
    REMOTE_HOST=
    REMOTE_ADDR=127.0.0.1
    SERVER_PROTOCOL=HTTP/1.1
    REQUEST_PROTOCOL=HTTP
    REMOTE_USER=
    HTTP_CONTENT_LENGTH=
    HTTP_CONTENT_TYPE=
    HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
    HTTP_HOST=host
    HTTP_ACCEPT=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
    application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword,
    application/pdf, */*
    HTTP_ACCEPT_ENCODING=gzip, deflate
    HTTP_ACCEPT_LANGUAGE=en-us
    HTTP_ACCEPT_CHARSET=
    HTTP_COOKIE=ses= (removed due to length limitations)
    Authorization=
    HTTP_IF_MODIFIED_SINCE=
    HTTP_REFERER=

    Hi Matt
    Thanks for your help. Here's some extracts from a NUnit test case that I made to show ArrayBinding bombing on VARCHAR2(4000).
    private void SetupAdapterAndCommandForArrays()
    OracleParameter p9 = new OracleParameter();
    p9.OracleDbType = OracleDbType.Varchar2;
    p9.ParameterName = ":p_instr_array";
    p9.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
    p9.ArrayBindSize = new int[]{4000, 4000};
    p9.Size = 2;
    p9.Direction = ParameterDirection.Input;
    p9.ArrayBindStatus = new OracleParameterStatus[]{OracleParameterStatus.Success,OracleParameterStatus.Success};
    OracleCommand comm = new OracleCommand();
    comm.Connection = new OracleConnection("Data Source=aboded12_local;user id=pcm_app;password=pcm_app");
    comm.CommandText = "PCM_OWNER.PKG_DAC_JASON.InsertStringArray";
                   comm.CommandType = CommandType.StoredProcedure;
    comm.Parameters.Add(p9);
    da = new OracleDataAdapter();
    da.InsertCommand = comm;
    da.InsertCommand.Connection.Open();
    [Test]
    public void TestStringArrayOf4000()
    SetupAdapterAndCommandForArrays();
    da.InsertCommand.Parameters[0].Value = new string[]{new string(Convert.ToChar("3"),4000), new string(Convert.ToChar("4"), 4000)};
    da.InsertCommand.ExecuteNonQuery();
    So when I run TestStringArrayOf4000() i get the : Oracle.DataAccess.Client.OracleException : ORA-02005: implicit (-1) length not valid for this bind or define datatype error.
    If i run another test i have that sets up an array with less than 4000 this works fine.
    any help you can offer is greatly appreciated!
    Message was edited by:
    [email protected]
    Message was edited by:
    [email protected]

  • BLF indicator unavailable for this line

    Hello,
    My user has 4 BLF lines defined. 3 correctly display the phone icon but the 3rd of 4 shows the graphic which is "BLF indicator unavailable for this line". Can anybody tell me what could cause this ?.
    All four numbers are in the same range as the user.
    All four numbers are in the same partition as the user.
    All four numbers are correctly defined.
    All four numbers are working for the respective owners.
    All are fully qualified E.164 numbers.
    Many thanks
    Stephen

    Hi Stephen,
    My guess would be that you don't have the Subscribe CSS properly configured. Can you check that ?
    You need to put a CSS that includes the partition of the monitored phone. Or you can compare with the other lines that are already working
    Regards,
    Christos

  • What can i replace this bind variable with in function?

    Hello
    I am creating a report showing training attended by employees. I have written a function to do the following:
    Parameters 1 - 4 is hard coded for a reason. So we dont worry about them.
    5th parameter: :START_DATE represents the date training started
    6th parameter: :END_DATE represents the date training ended.
    These date parameters are correctly used inside the select statement that the function is built upon. So don't worry that my date parameters are correct/incorrect.
    The focus should be on how you use bind variables inside Discoverer Admin. The select at the bottom runs perfectly in Toad and it allows you to use the date parameters as bind variables. But it does not allow it in Discoverer Admin
    The problem is with Parameter 5 and 6. I dont want to hard code the dates as i want the user to be able to enter his own date parameters.
    Discoverer Admin gives an error is i want to use :START_DATE and :END_DATE as parameters
    Does anyone have a solution for my problem.
    This is what the code looks like.
    SELECT apps.xxhr_fsc_training_info.xxhr_fsc_training ('A', '02','M', 'N',:START_DATE, :END_DATE)category_A_training
    , apps.xxhr_fsc_training_info.xxhr_fsc_training ('B', '02','M', 'N',:START_DATE, :END_DATE)category_B_training
    , apps.xxhr_fsc_training_info.xxhr_fsc_training ('C', '02','M', 'N',:START_DATE, :END_DATE)category_C_training
    , apps.xxhr_fsc_training_info.xxhr_fsc_training ('D', '02','M', 'N',:START_DATE, :END_DATE)category_D_training
    , apps.xxhr_fsc_training_info.xxhr_fsc_training ('E', '02','M', 'N',:START_DATE, :END_DATE)category_E_training
    , apps.xxhr_fsc_training_info.xxhr_fsc_training ('F', '02','M', 'N',:START_DATE, :END_DATE)category_F_training
    , apps.xxhr_fsc_training_info.xxhr_fsc_training ('G', '02','M', 'N',:START_DATE, :END_DATE)category_G_training
    from dual
    Edited by: iandekoker on Jun 8, 2009 9:34 PM

    Rod
    I have a request. The request is based on various emails written about passing parameters in Discoverer Admin/Desktop. Now if you are experienced and work with set copntext on regular basis then it should be a walk in the park. However if you are new to it like me, then it seems a daunting task. So my request is: Can't you provide us with an example of how to complete the whole process from begin to end using an actual example? I will kick off the process and maybe you can add where i left something out?
    Example:
    SELECT ENAME, HIRE_DATE
    FROM EMP
    WHERE HIRE_DATE = :IDATE;
    We want to run this select statement in Discoverer Admin, but Admin does not like the :IDATE bind variable. So now we are gonna use SET CONTEXT to find a solution to our problem.
    Step1:
    First we have to create a context namespace in the database for the Discoverer contexts. Here is the code to create the context. It is okay to also named your function EUL_DISCO as this name would work perfectly for almost everyone. Best is to do all of this in the Apps schema. Copy and paste this code in Toad and F9 it. It should compile successfully
    CREATE OR REPLACE CONTEXT eul_disco
    USING apps.eul_disco;
    Step 2:
    Now you need to create a package to enable you to set and retrieve contexts from in Discoverer. Here is the code to create the package and package body. Just copy and paste the code into Toad and F9 (execute) it to create the package.
    --Package Spec
    CREATE OR REPLACE PACKAGE eul_disco AS
    FUNCTION set_context(p_name VARCHAR2, p_value VARCHAR2) RETURN VARCHAR2;
    FUNCTION show_context(p_name VARCHAR2) RETURN VARCHAR2;
    END eul_disco;
    --Package Body
    CREATE OR REPLACE PACKAGE BODY eul_disco IS
    FUNCTION set_context(p_name VARCHAR2, p_value VARCHAR2)
    RETURN VARCHAR2 AS
    BEGIN
    dbms_session.set_context('EUL_DISCO', p_name, p_value);
    RETURN p_value;
    END set_context;
    FUNCTION show_context(p_name VARCHAR2)
    RETURN VARCHAR2 IS
    BEGIN
    RETURN SYS_CONTEXT('EUL_DISCO', p_name);
    END show_context;
    END eul_disco;
    Step3:
    Once you have created this package successfully you need to log into Discoverer Admin. Then use the menu to navigate to Tools > Register PL/SQL Function. A window called 'PL/SQL Functions' will appear. Select the 'Import...' button. A new window called 'Import PL/SQL functions' will appear. Scroll down until you see set_context function. Once you found it click OK to import it to End User Layer. Do the same to import show_context function. Remember there are two functions and you need to import them both. When you are done, click 'Apply' button. Then click 'OK' button. You can double check to make sure your functions have been imported. Just nagivate to Tools > Register PL/SQL function again. When the window 'PL/SQL Functions' appears your function(s) should be in the list on the left hand site. Scroll down untill you find them.
    Step4:
    Now it is time to set your session parameters in a separate worksheet inside Discovere Desktop from your main reports. The following steps show you how to create a worksheet to define an effective date parameter. The parameter worksheet should be based on a folder that always returns exactly one row.
    Log into Discoverer Admin. Open the Business Area you want to use. Then create "New Custom Folder..."
    Copy and paste this code (select sydate from dual) inside the New Custom Folder and validate the code. Also rename your folder to 'Set Context Folder'
    Step 5
    Next log into Discoverer Desktop and choose 'Create New Workbook'. Then choose table layout option. In the available list choose 'Set Context Folder'. When you have highlighted 'Set Context Folder' click on '>' button. Then click then 'Finish' button. Once the workbook is created you will see 1 column called Sysdate and a row with today's date in it. Save this workbook and name this workbook XYZ. You might even rename the sheet to QWE.
    Step 6:
    Still in Desktop working on XYZ workbook on QWE sheet, click on Tools > Parameters > New. In the 'Name' field enter START_DATE. Next leave 'Create condition with operator' box unticked. Next in 'Prompt' field enter START_DATE. In 'Description' field enter START_DATE. In 'Default' field enter NULL. Click OK button when you are done.
    Step 7:
    Still in Desktop working on XYZ workbook on QWE sheet, click on Tools > Calculation > New. Click on 'Functions' radio button. Then click on 'Database' folder to expand it. Scroll down till you see 'Set Context' function in the list. Select it and click 'paste >>' button. It will now show: SET_CONTEXT(P_NAME, P_VALUE). Now you need to replace the two parameters (P_NAME, P_VALUE) of the function. Replace P_NAME with 'START_DATE'. When you are done click on Items radio button. Then click on the Parameters folder and select Start_Date.
    When you are done it should look like this: SET_CONTEXT('START_DATE',TO_CHAR(:START_DATE))
    You might want to rename this calculation to START_DATE
    Ps. If you need to create two date parameters START_DATE and END_DATE then you repeat step 7 cause you need one more calculation.
    Just replace START_DATE with END_DATE. You also might want to call this second calculation END_DATE. Thus when you are done you will have 2 calculations:
    SET_CONTEXT('START_DATE',TO_CHAR(:START_DATE))
    SET_CONTEXT('END_DATE',TO_CHAR(:END_DATE))
    This is useful when you want date parameters similar to: 'where date between :Start_date and :End_date'
    Step 8:
    When you now run the XYZ workbook (QWE sheet) it will prompt you for an START_DATE. Enter 10-Jun-2009 (make sure the format you enter the date is similar to the format you have set up in discoverer). Now your XYZ workbook have 2 columns. First column is still called Sysdate with today's date. The second column is called START_DATE with 10-JUN-2009 in it.
    Step 9:
    Now you want to remove the 'SELECT SYSDATE FROM DUAL' data stored in 'SET CONTEXT FOLDER' from your XYZ workbook (QWE sheet) as you no longer need that. Still working with Desktop inside XYZ workbook on QWE sheet > click on Sheet menu option > then Edit Sheet option. On the Select Items tab click on 'Set Context Folder' and click < button to remove the folder from workbook XYZ. Click OK when done and run the workbook XYZ (sheet QWE) again. Now the workbook XYZ (sheet QWE) should only have one column called START_DATE and 10-Jun-2009 as the only row.
    Step 10:
    Rob you might want to come in here. It is also useful to create another calculation retrieving the value of the parameter, so that the value entered for the parameter can be seen when the workbook is run. Please give step by step instruction to complete this process
    Step 11:
    Still remember your initial problem where we wanted to use :IDATE in Discoverer Admin folder, but Discoverer Admin did not like the :IDATE syntax?
    SELECT ENAME, HIRE_DATE
    FROM EMP
    WHERE HIRE_DATE = :IDATE;
    Solution:
    Well now you just replace :IDATE with TO_DATE(SYS_CONTEXT('EUL_DISCO','START_DATE'))
    Log into Discoverer Admin. Open your Business Area. Then create 'New Custom Folder..'.
    Copy the code below and paste it into the new custom folder.
    Then validate the code.
    Rename the new custom folder to 'Solution'
    --copy and paste this code into folder 'Solution'
    SELECT ENAME, HIRE_DATE
    FROM EMP
    WHERE HIRE_DATE = TO_DATE(SYS_CONTEXT('EUL_DISCO','START_DATE'))
    note: 'EUL_DISCO' is the name of the context and package you created in step1
    : 'START_DATE' is the name of the calculation you did in step7
    Then log onto Discoverer Desktop > open your workbook XYZ > open sheet QWE.
    Click on Menu item called Sheet > New Sheet > choose Table layout > click next > scroll down available folders till you find SQL folder with then name 'Solution'. Select 'Solution' folder and click > then click Finish.
    The folder named 'Solution' will be used to populate the newly created sheet with data. You might want to rename the newly created sheet to 'Finally'.
    At this point workbook XYZ should have 2 sheets (QWE and Finally).
    Sheet 'QWE' contains the parameter and nothing else.
    Sheet 'Finally' displays the code found in folder 'Solution'
    First you run sheet QWE to set parameter. When prompt for a date enter '10-JUN-2009'. Click OK button.
    Then click on sheet 'Finally' to allow the parameter to take effect and do its job. You will see that only data true of 10-JUN-2009 are displayed
    Notes:
    This is a very simple example. But if you work thru this example, then you will get the concept behind the idea and would you be able to satisfy your own need.

  • Open cursor for and bind variables

    Hello all,
    how can I assign values to a bind variable before opening a cursor?
    example code:
    DECLARE
       TYPE ref_cur_t IS REF CURSOR;
       l_ref_cur   ref_cur_t;
       l_query VARCHAR2 (100)
             := 'select * from table t1 where ndx= :var_index' ;
    BEGIN
       -- assign a value to :var_index
       OPEN l_ref_cur FOR l_query;
    END;Thanks!

    Something like this ->
    scott@ORCL>
    scott@ORCL>DECLARE
      2     l_ref_cur   sys_refcursor;
      3     l_query VARCHAR2 (100) := 'select * from emp where empno = :var_index';
      4     l_empno  number(4);
      5  BEGIN
      6     l_empno := &emno;
      7     -- assign a value to :var_index
      8     OPEN l_ref_cur FOR l_query using l_empno;
      9  END;
    10  /
    Enter value for emno: 7698
    old   6:    l_empno := &emno;
    new   6:    l_empno := 7698;
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:19.78
    scott@ORCL>Regards.
    Satyaki De.

  • Null check for a bind variable in view criteria

    Hi, Greetings.
    I am using Jdeveloper 11.1.2.0.
    I have a view object, LocationsView, for locations table of the XE database.
    I want to apply a condition, ((:bind_var is null) or (:bind_var is not null and location_id = :bind_var), in this LocationsView.
    That is, I want to apply the condition only if the bind variable value is not null.
    How can I construct this condition using a declarative view criteria?
    Any help and hints on this regard is greatly appreciated.
    Regards,
    Guru K

    Hi,
    Thanks for the update and it is working perfectly fine.
    Now, how can I set the "ignore null values" option as checked if I am constructing the criteria programmatically using view criteria row and view criteria item at runtime.
    Thanks and regards,
    Guru K

  • Best Practice for setting bind variable when application loads

    I am using JDeveloper 11.1.2.3.
    When my application loads, the first unbounded page has a table populated by a named query.
    I would like to set the parameter used by the named query when the page loads, to populate the initial data that is displayed.
    What is the best practice for a solution to this issue?

    user6003393 wrote:
    I am using JDeveloper 11.1.2.3.
    When my application loads, the first unbounded page has a table populated by a named query.
    I would like to set the parameter used by the named query when the page loads, to populate the initial data that is displayed.
    What is the best practice for a solution to this issue?Hi,
    You can set the bind variable on VO by overriding prepareSession() method in Application Module check this http://docs.oracle.com/cd/E37975_01/web.111240/e16182/bcservices.htm#sthref357
    Setting bind variable on runtime http://docs.oracle.com/cd/E37975_01/web.111240/e16182/bcquerying.htm#CHDECJHD
    Zeeshan

  • Make List of Values for Required Bind Variables

    In the SQL query for my View Object, I have a bind variable, which I set to "required". In the search form resulting from a View Criteria, a textbox shows up asking the user for the value of that variable. Is there a way to make it a List of Values instead?

    Hi WV,
    Create a transient attribute in your VO that contains the LOV and then set the value of your bind variable to point to this new transient attribute. Also here is another approach
    https://blogs.oracle.com/shay/entry/adf_query_with_parameters_and
    Let us know how it goes.
    -Juan Camilo

  • What is bad with this bind variable.

    i get a error bad bind variables. i dunno what is bad here.
    FUNCTION DisturbrLoops(i_currTerm IN NUMBER,
                              i_Termoutofloop IN Merc.T_NUMLIST,
                              i_currentTermonloop IN Merc.T_NUMLIST) 
                              RETURN NUMBER is
    v_sql        VARCHAR2(1000);
    cntLoops NUMBER;
    BEGIN
      BEGIN
      select count(distinct assoc1.loopid)
          from ndw_segment                  ns1,
             ndw_loop_segment_association assoc1,
             ndw_loop_segment_association assoc2,
             ndw_segment                  ns2
        where ns1.termsysid = :i_currTerm
         and ns1.segment_id = assoc1.segment_id         
         and assoc1.loopid = assoc2.loopid
         and assoc2.segment_id = ns2.segment_id
         and ns2.termsysid in
             (SELECT * FROM TABLE(CAST(:i_Termoutofloop AS Merc.T_NUMLIST)))
         and ns2.termsysid NOT in /*(1,2,3,4)*/
            (SELECT *
                FROM TABLE(CAST(:i_currentTermonloop AS Merc.T_NUMLIST)));
        EXECUTE IMMEDIATE v_sql
                BULK COLLECT INTO cntLoops 
                USING i_currTerm ,i_Termoutofloop ,i_currentTermonloop;
    /*  dbms_output.put_line(v_Termoutofloop.count);*/
      EXCEPTION
        WHEN OTHERS THEN
         -- catch all errors. what to do.
         dbms_output.put_line( SQLERRM || ' ' || SQLCODE);
        null;
      END;
    return cntLoops ;
    END DisturbrLoopsEdited by: user8798946 on Sep 14, 2009 1:45 AM

    In PL/SQL syntax there is no colon or any other symbol in front of a variable name. Just use <tt>i_currterm</tt>, <tt>i_termoutofloop</tt> etc.

Maybe you are looking for