SQL in ADF mode

I'm new to ADF. I developed the application in forms10g. Most of the cases we are created from the points of view and using view to display the records.

I start with a smal report in the ADF. I have already created view in pl/sql with links on different tables. When I create with the view display objects, the problem is ROWID. Because of the other linked table in the view, the view is unable to choose a ROWID. But I have created two ViewOjects. I created viewlink between these your.
When I run the Application Module, it runs correctly. I created the page Panel accordion & tab.
When I went through the page and scrolling of the registration, the details of the data does not change as I get the message on Jdev below.

CurrencyRowKeySet > < _computeCurrentRowKey > ADFv: Rowkey has no primary key attributes. RowKey: oracle.jbo.Key [], table: oracle.jbo.server.ViewObjectImpl@75b18.

Please help me because I am only a starter in ADF

For the component that you want to refresh the PartialTrigger... set the id of the component on which it is dependent.
If you're new, best way to select the id is to click on the small arrow marked the end of the PartialTrigger property, click on edit and then select the component.

Amit

Tags: Java

Similar Questions

  • ID of Instance composite BPM ADF mode

    Hello

    I want to pass the ID of the composite instance BPM to display the SQL property of the object. I tried to use taskController.taskView.selectedParentTask.compositeInstanceId in bind variable from view of the adf, but unfortunately it did not work. I try to get the current composite instance id. I use Jdev 11.1.1.7 thanks for the help.

    Kind regards

    Well Finally I am able to obtain and transmit the composite instance id to display. I had to create a view criteria then I used the view base run with param in my workflow and where I got the composite instance of bpm payload id. I had to run with param activity an activity by default and then created a link with the page using flow control.

  • status of the database api (PL/SQL) based adf BC?

    Hello

    does anyone know the status of the API database (PL/SQL) based project ADF BC?
    (mentioned here: https://groups.google.com/forum/?fromgroups#! msg/adf-methodology/TiP2JXQm_Ag/zNbD7Kyf6hUJ)

    The following link does not work:
    https://database-API-based-ADF-BC.SampleCode.Oracle.com/

    It is also not included in the sample code oracle: http://www.oracle.com/technetwork/indexes/samplecode/jdeveloper-adf-sample-522118.html

    concerning
    Peter

    Hello

    The following link does not work:
    https://database-API-based-ADF-BC.SampleCode.Oracle.com/

    Avrom and EMG moved the project to a server that no longer exists. I had the code example of Avrom (at least a copy) and intend to work with Chris Muir to again make it a project of the EMG. Due to my time constraints used to be until the end of the year.

    The code that you can download on the blog of Avrom however works fine.

    Frank

  • SQL in SQL expressions declarative mode your - possible?

    Hi all

    I intend to create a declarative SQL VO and wonder if I would be able to use SQL expressions in the select clause - for ex-SUBSTR(col1,1,10). Is this possible?

    I searched and could not find any reference.

    Thank you
    Srini

    Srini, @chris hope that you don't mind not in
    Just checked this in 11.1.1.4.0 and 11.1.1.6.0 and it worked for me.
    I used the HR schema and the table Departments

    ...
      
      
    ...
    

    The nnn attribute I added to display only the first 5 characters of the name of the Department.

    Timo

  • State management of package PL/SQL in ADF

    Hi all

    I redesign a form of Oracle in the ADF. The shape is a front end for some fairly complex processing that is provided by a database package. The package maintains the different data elements in its State which are used during the session of the interactive user. I would like if possible to reuse functionality in this package for the ADF in the screen version. Clearly, in order to use the package as what I would need to ensure the that maintaining the connection to the database for the user's session just as it would be in forms.

    I have been reading up on top of the connection and the Application Module pool and think it is possible to switch off the two pools and ensure that a user session gets a single database session - set jbo.ampool.doampooling = false and jbo.doconnectionpooling = false (default). I am not mistaken in this or have I missed part of the battery of the session/connection?

    Assuming that it is possible, is it advisable? The maximum number of concurrent users on the application server would be about 200, access to a number of different databases.

    The alternative I suppose would be to redesign the package in the ADF BC layer. While it is perhaps the best architecture if there would be a major effort in the redevelopment of the Java code from scratch.

    I use JDeveloper/ADF 11.1.1.3.

    Thank you very much

    Kevin.

    Yep, it's no doubt that the technique is called 'Dynamic JDBC Credentials'.

    In this for terms is it advisable, for 200 users, assuming that the memory of your package is not huge each user would be nice. Ideally you don't want to rewrite (and a new test) all this code database then go with what you have.

    However, in saying that this is not the best option when you want to scale to a huge amount of users. The best way to make sure is to stress test by using a tool such as JMeter to see if things stand up to.

    CM.

  • ADF 12 c + MySQL 5.6 history columns

    Hi all.

    I work with JDeveloper (12.1.2) 12 c and MySQL 5.6. I configured the BC4J entities to work properly with MySQL 5.6.

    My PK is DBSequence because it is an AutoIncrement column in the database. I was coding a subclass the EntityImpl class and overloaded method doDML in order to call "last_insert_id()" and get the value of my PK.

    History columns properly. I had to use the latest mySQL driver to have the columns of history (Timestamp ones) work with microseconds. I made some changes in the Configurations of the ApplicationModule, if the database tag looks like this:

    <Database jbo.TypeMapEntries="Java" jbo.sql92.JdbcDriverClass="com.mysql.jdbc.Driver" jbo.locking.mode="optimistic" jbo.SQLBuilder="SQL92" jbo.sql92.DbTimeQuery="select SYSDATE() from dual"/>
    

    When I test the Application Module, I can insert, edit, and delete records. The columns of my story and PK (created the, created by, modified the changed by) work as expected. It works!

    However, when you test a page, where I dragged and dropped one of my ViewObjects in a table and had a button whose actionLister is defined with the action CreateInsert of the iterator of my ViewObject, I get this exception:

    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'sysdate' in 'field list'
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
      at com.mysql.jdbc.Util.handleNewInstance(Util.java:395)
      at com.mysql.jdbc.Util.getInstance(Util.java:370)
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1037)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4096)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4028)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651)
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2712)
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2662)
      at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1596)
      at weblogic.jdbc.wrapper.Statement.executeQuery(Statement.java:509)
      at oracle.jbo.server.BaseSQLBuilderImpl.getCurrentDbTime(BaseSQLBuilderImpl.java:3304)
      at oracle.jbo.server.DBTransactionImpl.getCurrentDbTime(DBTransactionImpl.java:6833)
      at oracle.jbo.server.DBTransactionImpl2.getCurrentDbTime(DBTransactionImpl2.java:518)
      at oracle.jbo.server.EntityCache.getCurrentDbTime(EntityCache.java:2647)
      at oracle.jbo.server.AttributeDefImpl.getHistoryContext(AttributeDefImpl.java:5910)
      at oracle.jbo.server.EntityImpl.getHistoryContextForAttribute(EntityImpl.java:10913)
      at oracle.jbo.server.EntityImpl.initHistoryColumns(EntityImpl.java:1773)
      at oracle.jbo.server.EntityImpl.initDefaults(EntityImpl.java:1685)
      at oracle.jbo.server.ViewDefImpl.newInstance(ViewDefImpl.java:2546)
      at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:6263)
      at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:2158)
      at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:2763)
      at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:2808)
      at oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:2785)
      at oracle.jbo.server.ViewObjectImpl.createRow(ViewObjectImpl.java:12096)
      at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1375)
      at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2189)
      at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:751)
      at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:407)
      at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:255)
      at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:188)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at com.sun.el.parser.AstValue.invoke(AstValue.java:254)
      at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:302)
      at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1794)
      at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
      at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:123)
      at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
      at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:1083)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:402)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:225)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:341)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:192)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:478)
      at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:478)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:303)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:208)
      at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:202)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:137)
      at java.security.AccessController.doPrivileged(Native Method)
      at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
      at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
      at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:120)
      at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:217)
      at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:81)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:225)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3367)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3333)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
      at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2220)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2146)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2124)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1564)
      at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:254)
    

    It is clear that something is not set up to go with MySQL allows you to request a period of database, but I don't know what else I need to change. I also changed adf - config.xml in Application resources/ADF META - INF and the value SQL platform SQL92, but did not work.

    Any ideas?

    Kind regards.

    Thank you Jan.

    I already looked at the issue you mention, but since my BC4J Tester works very well, I thought it would be the same with the ViewController.

    I have not found a declarative solution, so in the end, that's what I did to get my story (the timestamp ones) work with MySQL columns:

    First of all, I have a base class that extends from oracle.jbo.EntityImpl and my other classes (entities) extend my base class. In this way, I just changed my base class in order to have all the features in my work. I have replace the following method in my base class:

        @Override
        protected Object getHistoryContextForAttribute(AttributeDefImpl attributeDefImpl) {
            byte historyKind = attributeDefImpl.getHistoryKind();
            switch (historyKind) {
            case AttributeDefImpl.HISTORY_CREATE_DATE:
            case AttributeDefImpl.HISTORY_MODIFY_DATE:
                return new Timestamp(System.currentTimeMillis());
            }
    
            return super.getHistoryContextForAttribute(attributeDefImpl);
    }
    

    Then I set up the columns of history in my entities regardless on which SQL statement ADF will run against my database, because it's not going to any.

    Kind regards.

  • Where is the Advanced mode and basis in the planning of the 11.2.3.000

    Hello.. I remember they were there in 11.1.1.3.000

    Concerning

    Which is more (much less), he went in the ADF mode conversion in 11.1.2.2

    See you soon

    John

    http://John-Goodwin.blogspot.com/

  • [ADF, JDev 12.1.3] To run a query on the fly is always necessary to define a VO? How to get the Id of the last line inserted in a VO...

    Hallo,

    Sometimes, in the code for my application, I need to run smaller queries to retrieve data from the database.

    I wonder if for these queries, it is necessary to define a View object or if I can avoid this for example creation and execution of a VO on the fly.

    In this case I would not define a VO, given that queries will be never used to display data, but only for the internal logic.

    A use case, I want to solve it next.

    I would like to create a function to be used after validation for last inserted record by a user in a TableVO.

    For example

    Select the Id of the Table where UserId =? and Type =?

    The query should be run in a managed bean...

    public String okButton_action() {}

    OperationBinding operationBinding is BindingsUtils.getBindings () .getOperationBinding ("Commit");.

    Object result = operationBinding.execute ();

    If (! operationBinding.getErrors () .isEmpty ()) {}

    Error handling

    return;

    }

    Here, I need to:

    1. run the query to get the Id of the last inserted record

    2 call the setCurrentRowWithKey on the TableVO to update the display

    and get the Id (identity/auto-increment) than the database

    assigned to the field

    return "return";

    }

    If I can create a function that creates / runs the VO on the fly and return the value ID... It is best to create it in a class of public services or in the implementation class TableVO?

    I need to get the Id of the last line inserted since the ADF is not able to manage MS SQL Server identity fields (it seems that REFRESH AFTER INSERT cannot be used with non - Oracle DB).

    Any notice will be welocome.

    Thank you

    Federico

    The query should be run in a managed bean...

    Much better to execute the query in the template project.

    Example query: http://amit-adf-work.blogspot.com/2013/09/how-to-execute-sql-using-adf-application.html

    If I can create a function that creates / runs the VO on the fly and return the value ID... It is best to create it in a class of public services or in the implementation class TableVO?

    If you have the function that accepts the SQL as a parameter, then this should go to class util.

    Dario

  • SQL log file grows to limit, but it can be narrowed and used space is listed as 1%.

    Hello.

    3 guests ESXi 5.1.0 1463097 in a cluster.

    MS SQL 2008 R2 server (SQL Server 10.50.2500) on a Standard VM MS Windows 2008 R2 server.

    VIM_SQLEXP instance name

    Name of the comic: VIM_VCDB.

    Recovery mode: Simple

    DB 1 MB, unrestricted growth. Current database size: 3887MB

    Log growth of 10%, limited to 4 GB maximum size after shrink this morning BUT 2MB

    Every morning the logfile has run nearly full but the VMware VirtualCenter Server service runs and I can start the vSphere Client. I know not if I do not shrink the log, the service will stop later today or tomorrow.

    I studied and followed

    Determine where growth occurs in the VMware vCenter Server (1028356) database.

    SQL Server recovery mode affect the Transaction log space required (1001046)

    Troubleshooting of transaction logs on a Microsoft SQL database server (1003980)

    but I do not see any table more than many. I see that VPX_EVENT has increased about 28 MB at night, but nothing else seems alarming.

    Any ideas what it could be?

    Best regards

    Peter Lageri Rasch

    Denmark

    Hello

    Some time ago I had a similar situation as you.

    I recommend you to check this carefully, it might be useful:

    Troubleshooting when the vcenter db transaction log is full (MS SQL server 2005 express)

    Best regards

    Pablo

  • ADF - Brother MFC-9970-CDW

    How can I get Acrobat DC to use the ADF on my Brother MFC-9970-CDW.  At present it by default, the flat bed scanner.

    Maybe the scanner is not set to automatically detect the ADF pages. Try the following steps to configure this manually:

    Pass scanner-> custom scan and click on the Options button next to the drop-down list scanner

    The User Interface "Interface of the Scanner Show Native" value and click OK. Then click Scan to start scanning...

    When the Brother MFC Scanner window opens, choose scan ADF mode.

    This will set your scanner to scan always with this default setting.

  • Planning Web Form (mode Non - FAD) member selector Drop Down Format

    Hello

    Looking to see if there was a solution to a question that I ask myself.

    We are developing a planning system using several web forms. We recently put out ADF mode to see if that helps with stability problems we had. We've had some success with her, but our user base didn't like that the bottom of drop of Member in the POV selector became limited to only about 10 members. Also, rather than using a scroll bar to browse the available members, there are arrows on the bottom of the drop-down list that require the user to 'page' in the list of available members.

    I discovered that you can view the drop as a much larger list and using the scroll bar if you hold the button of the mouse on the drop down arrow POV, then operate the cursor on the bar in the drop-down list and scroll ther carefully, but we would much prefer to have the default of downs drop to this format.

    Is there a way to do this?

    Thank you

    Hello

    Yes, there is an application setting. In the application-> Settings, then Current default Application and display settings, in the options page so a parameter called "allow to search when number of Pages exceeds" and then you can specify the selection of the page returns with a shortlist and a search feature or the ability to complete scroll. The value of the number larger than the number of members in the dimension on the page of the form

    Thank you

    Anthony

  • Running a SQL command in my bean class

    Hi all

    I use JDeveloper 12.1.2.0.0.

    I have an interest in running a query in my method of bean. I did some research and I always have a code but it does not find the method that the method requires so I tried to add the query in my AppModule and I added my method as a data control, but how do I access and change my method of bean?

    The page with the code that does not find the method: http://jjzheng.blogspot.pt/2010/11/run-single-query-in-application-module.html

    Gives me: 'Method 'getDBTransaction' not found'

    The page that creates my method as a data control: http://amit-adf-work.blogspot.pt/2013/09/how-to-execute-sql-using-adf-application.html

    This is the right way? How can I run a SQL command in my bean class?

    Kind regards

    Frederico.

    This is the code I am using

    GET A METHOD OF PAGEDEF AND RUN

    get the link containe

    BindingContainer links is BindingContext.getCurrent () .getCurrentBindingsEntry ();.

    get an Action or a MethodAction

    Method of the class OperationBinding = bindings.getOperationBinding ("YourMethodAction");

    If there are parameters to define...

    Map paramsMap = method.getParamsMap ();

    paramsMap.put ("param", "value");

    execute the method

    Method.Execute ();

    List errors = method.getErrors ();

    If (! errors.isEmpty ())

    {

    handle errors errors here is a list of exceptions!

    }

    no error return to normal work

    Timo

  • sql query format

    ATTRIBUTE_VAL ATTRIBUTE COMPANY
    -------------------- -------------------- -------------
    IBM country United States
    NY State IBM
    IBM New York City
    HP country United States
    HP State CA
    HP Palo Alto city
    Google country United States
    State of Google CA
    Google city Italy


    This o/p I need the o/p as

    -------------------- -------------------- -------------
    Country United States
    NY State IBM
    New York City
    Country United States
    HP State CA
    City of Palo Alto
    Country United States
    State of Google CA
    City of Mountain View

    Please help me... How can I do it... and how can I implement... Thanks in advance...

    Published by: start on Sep 3, 2011 15:24

    Try this

    SQL> select decode(mod(rn,2),0,company,null) COMPANY, attribute, attribute_val
      2  from (select company, attribute, attribute_val, rownum rn from sample);
    
    COMPANY ATTRIBUTE       ATTRIBUTE_VAL
    --------------- --------------- ---------------
                    Country         US
    IBM             State           NY
                    City            Newyork
    HP              Country         US
                    State           CA
    HP              City            Palo Alto
                    Country         US
    Google          City            CA
                    City            Mountain View
    

    On the other hand, if you want the first occurrence to display and the second to be hidden, it can be done simply as follows using PAUSE

    SQL> Break on company
    SQL>
    SQL> select company, attribute, attribute_val from sample;
    
    COMPANY         ATTRIBUTE       ATTRIBUTE_VAL
    --------------- --------------- ---------------
    IBM             Country         US
                    State           NY
                    City            Newyork
    HP              Country         US
                    State           CA
                    City            Palo Alto
    Google          Country         US
                    City            CA
                    City            Mountain View
    

    Edited: Alternative included SQL

  • To access the tips of existing PL/SQL API

    Hi all in the JDev/ADF community,

    I am a beginner in ADF coming from a form and background of PL/SQL. Using JDeveloper 11.1.1.2, I lived quite a few examples and read a lot of different guides developers. I'm happy with the basics of the model controller architecture and display when simply based on database tables. For example, I can create a fairly complex page with tabs, master relationships / detail, editing etc.

    The app I am writing to you in the end is to sit on top of an existing PL/SQL packages that provide most of the data and logic that surround it.

    So, to finally get to my question... I wonder what is the best way to approach using aspects of the API of PL/SQL in British Colombia ADF? I saw some things in the background documentation around the use of an API of simple table with procedures for insert/update/delete, however I cannot find directions on how to access the data returned in associative arrays. For example, there is a procedure that is called with a particular key value (will be passed as a parameter to the page) which returns then several tables of different records PL/SQL (for example, the OUT parameters). I need to access this information during a session of the app, so I think I need somehow to load it into an entity or view object. Y at - it an interface to access the record types and table PL/SQL in this way?

    Obviously, I want to reuse as much of the existing infrastructure, as I can, but if there are areas where this would result in unnecessary complexity on the side of the ADF, I'd consider reworking of these parts.

    I'm not a complete solution at this stage - just a few pointers on what direction to look would be much appreciated.

    Thank you very much

    Kevin.

    Published by: user11363101 on March 11, 2010 11:33 (added version JDev)

    I would like to just one part of your question, given that Frank has indicated you in the General documentation to call PL/SQL from ADF business components address.

    You asked specifically about the transmission of arrays and associative arrays to and from PL/SQL procedures. These are artifacts of PL/SQL that do not interact with the outside environment. The main problem is that the modules developed in Java and other languages cannot easily discover the metadata for these tables. You'll need to translate into objects Oracle you set with the CREATE TYPE command. Here is one of my favorites:

    CREATE TYPE vc_arraytype AS TABLE OF VARCHAR2(4000);
    

    Then you declare objects of this type, and given that plug-ins can ask the database 'what is a VC_ARRAYTYPE?', they can use these objects. You would change your PL/SQL so that it uses tables from database nested as it instead of collections of native PL/SQL, or create procedures of wrapper which translate the tables of database embedded in the forms required by your initial proceedings, call the initial procedures, can translate the results if necessary.

    Associative arrays with non-integer index are a particular problem, because there is no equivalent type that you can create with CREATE TYPE. You can use a pair of nested tables, one for the clues and one for values, or create a record type such as

    CREATE TYPE assoc_rectype AS OBJECT(name VARCHAR2(30), val VARCHAR2(4000));
    

    Then a table nested in these folders:

    CREATE TYPE assoc_arraytype AS TABLE OF assoc_rectype;
    
  • Pilot SQL Server problem

    I just got a new computer and had to reload all of my software, including SQL Server and Cold Fusion. I put everything in place now, but for some reason, I can not Cold Fusion to access the database at all. I get the message "connection failed for user"dwright". Reason: not associated with a SQL Server trusted connection. "The ID exists and is set up with the appropriate privileges.

    Anyone know why I get this error?

    Thank you

    DW

    Check that your SQL Server mixed mode authentication. This is disabled by default in SQL 2005 (and possibly 2008, if I'm wrong, someone correct me please).

Maybe you are looking for

  • ios7.1.2 of the iPhone 4's not going to happen to ios8

    iPhone 4 ios 7.1.2 won't move to ios8, can anyone help? Message informs you that your iphone software is updated, I tried using iTunes and the same message appears.

  • How to Start sshd in El Capitan?

    Hello I use the remote login on El Capitan. Can you fix the following? Before El Capitan: Turn on my mac, so I have to connect via ssh. After El Capitan: Turn on my mac and log in to my account, then I can connect via ssh. but I can not connect via s

  • MSN locked - I can't access my MSN account because I forgot the password

    I can not connect on my msn account cause, I forgot the password! I forgot the answer to my secret question. They gave me a PIN and that I have provided all the information and stilli I can't access my msn account! now I can't even contact with the c

  • Stuck on black screen Vista system restore

    Hi my family Vista premium would not start normally so I tried to select a safe mode restore point. The chosen restoration was cut for more than 12 hours on a screen black now I didn't no what to do next please help?

  • How to add album art

    How can I add my own personal photos for the songs in the Walkman on the phone. I've done this before but since I updated the app I can locate is no longer this function. Thank you