Confusion in executeQuery() method of ViewObject

Hi,
Can any one tell me executeQuery() method of ViewObject is actually going in database or what ?
how do it fetches the records ? I mean whether to go in database or from cache ? how does the viewobject knows from where to fetch data?
Thanks,
Janak

Hi,
cannot spare you from reading the documentation, sorry
ViewObjects
==========
http://download.oracle.com/docs/cd/A97339_01/doc/bc4j/BC4JRuntimeFiles/obcVOQuery.htm
ADF BC Developer Guide
===================
http://download-uk.oracle.com/docs/html/B25947_01/toc.htm
Especially the developer guide is a good source of information if you are new to ADF Business Components. Most of the questions asked here on the forum can be answered by copy and pasting from this document
Frank

Similar Messages

  • ExecuteQuery method of view object taking much time to execute

    Hi All,
    I am using a view object and execute the VO query using executeQuery method in VOImpl java.
    But, problem is, it is taking long time to bring the results after executing the query after setting the parameters. Same query in TOAD gives 4 seconds. While executing using executeQuery method, it is taking 5 mins.
    It is urgent issue. Please help me. Thanks.
    Regards, Soorya

    Hi Kali,
    Thanks for your prompt response.
    Yes. It has bind parameters. I have printed the statement before and after the executeQuery method
    ++VOImpl Code snippet++
    setWhereClauseParams(params);
    System.out.println("before executing query:Time:"+System.currentTimeMillis());
    executeQuery();
    System.out.println( "after executing query:Time:"+System.currentTimeMillis());
    +++
    I have removed some conditions in the query as it is business confidential. Please find the jdev log.
    ++++++++
    before executing query:Time:1322071711046
    [724] Column count: 41
    [725] ViewObject close prepared statements...
    [726] ViewObject : Created new QUERY statement
    [727] ViewObject: VO1
    [728] UserDefined Query: SELECT DISTINCT
    ai.invoice_num invoice_num
    FROM ap_invoices_all ai
    , ap_checks_all ac
    WHERE ...
    ai.org_id = :p_orgid
    AND ac.id = :p_id
    [729] Binding param 1: ,468,
    [730] Binding param 2: 247
    [731] The resource pool monitor thread invoked cleanup on the application module pool, AM, at 2011-11-23 23:41:32.781
    after executing query:Time:1322072052875
    +++++++
    Regards,
    Soorya

  • Overriding executeQuery Method in VOImpl in oaf

    Hi All,
    I am trying to override executeQuery method in my extended VOImpl method.
    The VO that I extended is JobsWithGradeLovVO.
    This is what I am writing in my method:
        public void executeQuery(){            
            writeLog("In the executeQuery");
            OADBTransaction tx = ((OAApplicationModuleImpl)getApplicationModule()).getOADBTransaction();               
            String where_grade = getCustomWhereClause(tx);
            this.setBindingStyle(1);
            writeLog("The binding style is: "+this.getBindingStyle());
            writeLog("The where clause is: "+where_grade);
            this.setWhereClause(null);
            this.setWhereClauseParams(null);       
            this.setWhereClauseParam(0, where_grade);
            //this.setWhereClause(where_grade);                
            String query = this.getQuery();       
            writeLog("The query is: "+query);               
            super.executeQuery();
    I modified the where clause of the Query in the xml  as (I added and vg.grade_id not in : 0 at the end of the where clause. The rest of it is the seeded one.):
    job.job_group_id = jgr.job_group_id  and jgr.internal_name = 'HR_'||:4  and (jgr.business_group_id = :5 or jgr.business_group_id is null) and  job.business_group_id = :6  and :7 between job.date_from and nvl(job.date_to ,:8) and job.job_id=vg.job_id(+) and :9=:9    and :10 between nvl(vg.date_from(+),:11) and nvl(vg.date_to(+),:12) and  hl.lookup_type(+)='YES_NO' and hl.lookup_code(+)=nvl2(vg.valid_grade_id,'Y',(decode(:13, -1,'', 'N'))) and pos.position_id(+)=:14 and job.job_id=pos.job_id(+) and :15 between nvl(pos.effective_start_date(+),:16) and nvl(pos.effective_end_date(+),:17) and vg.grade_id not in : 0
    I could observe that there is another "and" condition that is getting appended at the run time which is AND (( UPPER(job.NAME)  like UPPER( :2) ).
    When I try to run the page, I am getting Missing IN OR OUT PARAMETER at index 3.
    Could anyone please help me by letting me know the solution to this.
    Thanks,
    Srikanth

    doSelect() is not related to view object functionality.
    View Object's perform their own query, but coordinate via attribute mapping metadata, with underlying EO's.
    doSelect() is invoked on an Entity instance when:
    [list]
    [*]The entity instance needs to lock its row in the database (the lock boolean flag will be true if this is the case)
    [*]The entity instance needs to be faulted into memory either because of a findByPrimaryKey() in progress, or because business logic has referenced an attribute of the entity that was not already in the cache due to some view object's querying it.
    [list]

  • I'm confused about accessor methods.

    Part of the application I'm developing translates a sequence of strings into a series of hex values. The number of strings will be either 2 or 3. In the cass where there's 3 strings the last would represent an integer or a decimal fraction.
    I have a class Xlate that has 3 translation methods thus:
    public int[] translate(String msg) {};
    public int[] translate(String msg, int val) {};
    public int[] translate(String msg, String aValString) {};
    The problem I have is that the Xlate does not return what is expected when passed an argument via the method signature. If explicitly passed a string sequence it works OK.
    If I pass the argumants... "pause" "21.09876"
    I would expect to see a translation of ... "msg translation array = 76,98,10,20,0A"
    What I get is "msg translation array = FF, FF, FF, FF,FF" which indicates the array has not been amended after initialised.
    This is most likely due to the lack of accessor definitions and their use. HOWEVER, I am confused by such methods.
    I now realise that to pass values setter/getter accessor methods are .
    I think these might be along the lines of the following:
    private String[] commandList; // declares a string variable
    public Xlate() { this(""); }
    public Xlate(String[] msg) { this.commandList = msg[1]; } // holds the name
    public String getCommandStrings() { return this.commandList; } // gets the commandList
    I can't get this to work and know these are not correct.
    I need help to get me moving ahead of this problem. Any help would be appreciated.
    Thanks.
    Philip
    import java.lang.String;
    public class Control {
      public Control() {
       int i;
      static final public Xlate x = new Xlate();
    //  static final public Comms rc = new Comms();
      public static void main(String[] args) {
        String cmd[] =  args;
        for (int i=0;i<args.length;i++)
          cmd=args[i];
    controller(cmd);
    // public static void controller(String portName, String command, String parameter) {
    public static void controller(String[] parameters) {
    Control c = new Control();
    int[] msg ={1,1,1,1,1};
    // Booleans 'pragmaN' are used to select/deselect debug statements
    // though would be embedded in the bytecode
    // so these are not compiler directives
    boolean pragma1=true, pragma2=true, pragma3=true; // toggle using !
    int pVal;
    if (pragma1==true) {
    System.out.print("msg array = ");
    for (pVal=0; pVal<4;pVal++)
         System.out.print(Integer.toHexString(msg[pVal]).toUpperCase() + ",");
    System.out.println(Integer.toHexString(msg[pVal++]).toUpperCase());
    // rc.setupComPort(parameters[0]); // Configure the port referenced
    msg = x.translate("start"); //*********TRANSLATE()************
    msg = x.translate("pause","12.34567"); //*********TRANSLATE()************
    if (pragma2==true) {
    System.out.print("msg translation array = ");
    for (pVal=0; pVal<4;pVal++)
         System.out.print(Integer.toHexString(msg[pVal]).toUpperCase() + ",");
    System.out.println(Integer.toHexString(msg[pVal++]).toUpperCase());
    // rc.writeCmd(msg);
    // Control messages have 3 fixed formats comprising 'a string', 'a string
    // plus an integer' and 'a String plus a String'.
    // For the control messages with an argument a string is constructed before
    // translation by parging the arguments.
    // Do ensure the number of args is greater than 1 and less than 3.
    // Converts integer types to Strings
    String argString="";
    System.out.println("arg len = "+ parameters.length);;
    switch (parameters.length) {
    case 2:
         System.out.println("in switch 2");;
         argString = (parameters[1]);
         msg = x.translate(argString); //*********TRANSLATE()************
         if (pragma3==true) {
         System.out.print("msg translation array = ");
         for (pVal=0; pVal<4;pVal++)
         System.out.print(Integer.toHexString(msg[pVal]).toUpperCase() + ",");
         System.out.println(Integer.toHexString(msg[pVal++]).toUpperCase());
         break;
    case 3:
         if (pragma3==true) {
         System.out.println("in switch 3"); ;
         argString = (parameters[1] + parameters[2]);
         msg = x.translate(argString); //*********TRANSLATE()************
         if (pragma3==true) {
         System.out.print("msg translation array = ");
         for (pVal=0; pVal<4;pVal++)
         System.out.print(Integer.toHexString(msg[pVal]).toUpperCase() + ",");
         System.out.println(Integer.toHexString(msg[pVal++]).toUpperCase());
         break;
    default:
         System.out.println("Argument length error");
    break;
    // rc.writeCmd(msg);
    import java.text.*;
    import java.text.StringCharacterIterator; // required for CharacterIterator class
    public class Xlate {
    private String[] commandList; // declares a string variable
    public Xlate() { this(""); }
    public Xlate(String[] msg) { this.commandList = msg[1]; } // holds the name
    public String getCommandStrings() { return this.commandList; } // gets the commandList
    // These methods form a basic translation mechanism used as proof
    public int[] translate(String msg) {
    int[] paramList = {
         0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; //initialise this array
    //Power On and Off controls
    if (msg == "start") {
    paramList = new int[] {
         0xFF, 0xFF, 0xFF, 0x01, 0x20};
    if (msg == "stop") {
    paramList = new int[] {
         0xFF, 0xFF, 0xFF, 0x00, 0x20};
    return (paramList);
    public int[] translate(String msg, int val) {
    int[] paramList = {};
    int pVal;
    // Memory recall with memory ID.
    if (msg == "M") { // Recall memory
    paramList = new int[] {
         0xFF, 0xFF, 0xFF, 0xFF, 0x02};
    // stuff the argument in to the paramList array
    paramList[3] = Integer.decode(Integer.toHexString(val)).shortValue();
    return (paramList);
      public int[] translate(String msg, String aValString) {
    // Convert the string
        int i, j, k;
        int index = 0, c = 0;
        int[] p, paramList = {};
        final StringBuffer result = new StringBuffer(); // only ever one buffer
        char character;
        if (msg == "pause") {
          paramList = new int[] {
           0xFF, 0xFF, 0xFF, 0xFF, 0x0A};
    // The period character is the axle where operations centre...
    // working from the left most position index until period is found.
    // append chars to result string en route.
    // if period then stop - this is the integer part
        StringCharacterIterator sci = new StringCharacterIterator(aValString);
        result.append('0'); // a fudge to pad out the resulting string
        character = sci.current();
        while (character != '.') {
          //char is not a period so append to buffer
          result.append(character);
          character = sci.next();
        character = sci.next();
    // working from the position of 'the period character' append chars to result string en route.
    // stop at the end having bound the fraction part
        while (character != StringCharacterIterator.DONE) {
          result.append(character);
          character = sci.next();
        aValString = result.toString(); // save the result
        sci = new StringCharacterIterator(aValString);
        String[] part = {
         "00", "00", "00", "00"}; // array index ordered 0 to 3 from left to right
        result.delete(0, result.capacity()); // initialise the StringBuffer result
        character = sci.first();
        for (index = 0; index <= 3; ++index) {
          for (i = 0; i <= 1; ++i) {
         if (character != StringCharacterIterator.DONE) {
           result.append(character);
           character = sci.next();
         else {
           result.append('0');
          part[index] = result.toString();
          result.delete(0, result.capacity()); // initialise the StringBuffer result
    // the sequence handles the conversion of decimal to packed BCD for transmission
        for (k = 0; k <= 3; k++) {
          // cast the String in the array part indexed by k to an int
          i = Integer.parseInt(part[k]);
          for (j = 0; j < 10; j++) {
         if ( (i >= (j * 10)) & (i < ( (j + 1) * 10))) {
           paramList[k] = (j * 0x10 + (i - (j * 10)));
        return (paramList);

    Sorry, this is way too much to look at (at least for me). Please create a small test function that fails & post the formatted code. In doing this, you may even spot the problem yourself!

  • Slightly confused about notify method

    Hi,
    I'm currently studying for the SCJP exam and have 2 questions about the thread notify call.
    (1) Is it possible when a thread owns an object lock, i.e. say in synchronized code, that it can call the notify method on a particular thread. For example, say there are 2 threads, names thread1 and thread2, and thead1 obtains object lock, can it call Thread2.notify()? The reason I'm read conflicting web-pages, saying it isn't possible for 1 thread to notify another thread and it is up to Object to decide which thread to invoke, say must use notifyAll() or notify() call. Is this true?
    (2) Which thread in following code is Thread.sleep() referring to? Is it the main thread that created 2 threads?
    class running extends Thread
         public void run(){
    public class fredFlintStone{     
         public static void main(String[] args) {
              running  thread1 = new running();
              running thread2 = new running();
              thread1.start();
              thread2.start();
              try
              //confused here     
            Thread.sleep(12L);
              catch(InterruptedException e)
    }Cheers!

    its best not to confuse terminology here.
    marktheman wrote:
    I ... have 2 questions about the thread notify call.Thread is an object which has a notify() method. However you should never use it. You should only use notify() on regular objects.
    (1) Is it possible when a thread owns an object lock, A Thread holds a lock, see [http://java.sun.com/javase/6/docs/api/java/lang/Thread.html#holdsLock(java.lang.Object)]
    i.e. say in synchronized code, that it can call the notify method on a particular thread. A thread calls notify() on an object not a given thread. (Unless that object is a thread, but don't do that!)
    For example, say there are 2 threads, names thread1 and thread2, and thead1 obtains object lock, can it call Thread2.notify()?It can, but it would fail as you can only call notify() on an object you hold the lock to.
    The reason I'm read conflicting web-pages, saying it isn't possible for 1 thread to notify another thread It is possible but not in any useful way.
    and it is up to Object to decide which thread to invoke,The Object has no say in the matter, its up to the scheduler in the OS.
    say must use notifyAll() or notify() call. Is this true?no.
    (2) Which thread in following code is Thread.sleep() referring to? The javadoc says "Causes the currently executing thread to sleep". You should always check the documentation for asking that sort of question.

  • Confused about update method in JComponents

    Hello,
    I'm a bit confused about the update method in JComponents. What I remember from applets was that the update method was called whenever something changed such as a window being dragged across it or something.
    I've written a class that extends a JPanel and overwrites the paint method. Any components I add to it aren't drawn. I can add JComponent.update() methods to my paint() method but this is very inefficient as I'm having repaint() called by a thread 15 times a second. I tried to put the update methods in the JPanels update() but that doesn't work, in fact update isn't called at all. What does update do ?

    Let me take another crack at it...
    1) Grab the 9.2.0.8 patchset for the Oracle database (i.e. patch 4547809 on Metalink assuming you're using 32-bit Windows). Install this to upgrade your Oracle client to 9.2.0.8. Installation instructions are in the README.
    2) Grab the 9.2.0.8 Oracle ODBC driver, which you already appear to have, and follow the installation instructions in the README you're looking at.
    Justin

  • Confused regarding static methods

    Hello guys,
    I like to know the only purpose of static method is to call a method with out creating
    instance of that class.
    I am totaly confused why and where to use static methods.
    Thanks in advance
    aneesh

    Look at the API docs for some of the static methods in classes like java.lang.String, java.lang.Integer, java.lang.Thread, etc.
    An object--an instance of a class--has state and behavior. The state is captured in the instance variables--the array that holds the characters of a String, the name, SS#, and hireDate fields of an Employee object, etc.
    Static methods are used when the operation you're performing isn't associated with any particular instance of that class--it doesn't use or modify the state of a particular object. The operation is associated with the class as a whole.
    For instance, Integer.parseInt(String). You're not operating on an existing Integer object. Rather you're creating a new Integer from a String. It's a utility or "helper" method of the Integer class.
    And yes, do read the tutorial.

  • Confusion with toString() method

    hi...can you please tell me how to use the toString() method? i'm trying to print out a Vector and convert whatever is in it to strings but the memory addresses keep appearing. i tried using the method to convert (ie. getNames.toString, where getNames returns a vector, but it doesnt seem to work. i dont know what the problem is. i would really appreciate your help...

    The objects in the Vector (or whatever collection
    type you use) need to implement their owntoString()
    method. Otherwise they just inherit
    java.lang.Object's implementation, which gives you
    the result you are seeing -- how should the system
    magically know what to show for a string
    representation of any willy-nilly object?Furthermore: the OP actually needs to call it on the
    Vector's elements, not on the Vector itself.Not necessarily. I believe Vector.toString() iterates over the elements in it, invoking toString() on them.

  • Confused about BatchInteract method

    I am using a web service and the DI Server API to connect to the SBO database. I am able to login and to use the Interact method, but I have problems using the BatchInteract method. I think, my xml document has some failures. Can someone give me an example of a working batchinteract xml document?

    Hi Nico,
    I'm in the process of using the DI Server to create GL Accounts. Here is a copy of the XML that I'm using to create the GL Entries.
    <?xml version="1.0" encoding="UTF-16"?>
    <env:Envelopes xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Envelope>
         <env:Header>
              <SessionID></SessionID>
         </env:Header>
         <env:Body>
         <dis:AddObject xmlns:dis="http://www.sap.com/SBO/DIS" CommandID="Add GL Account">
         <BOM>
         <BO>
         <AdmInfo>
              <Object>oChartOfAccounts</Object>
         </AdmInfo>
         <ChartOfAccounts>
              <row>
                   <Name></Name>
                   <FatherAccountKey></FatherAccountKey>
                   <FormatCode></FormatCode>
              </row>
         </ChartOfAccounts>
         </BO>
         </BOM>
         </dis:AddObject>
         </env:Body>
    </env:Envelope>
    <env:Envelope>
         <env:Header>
              <SessionID></SessionID>
         </env:Header>
         <env:Body>
         <dis:AddObject xmlns:dis="http://www.sap.com/SBO/DIS" CommandID="Add GL Account">
         <BOM>
         <BO>
         <AdmInfo>
              <Object>oChartOfAccounts</Object>
         </AdmInfo>
         <ChartOfAccounts>
              <row>
                   <Name></Name>
                   <FatherAccountKey></FatherAccountKey>
                   <FormatCode></FormatCode>
              </row>
         </ChartOfAccounts>
         </BO>
         </BOM>     
         </dis:AddObject>
         </env:Body>
    </env:Envelope>
    </env:Envelopes>
    Please let me know if this helps.
    Thank You
    Stephen Sjostrom

  • I currently having problems when dialling with my 4S either from the contacts list, or when using the phone through bluetooth to my in-car system. The phone becomes confused regarding what method / route of connection handsfree, normal use or speaker.

    Hi each time i use my 4S phone a dial from the contact list, the phone will not select a communication mode, either normal speaker or handsfree (car), I have to force the phone into speaker mode and the back to normal mode before I can speak to or listen to anyone. The annoying aspect is the recipient of my call can answer but cannot hear me nor I them.
    What am I doing wrong, or is there an issue with the phone. The same situation occurs when the phone is used with bluetooth in my car, the previous iphone worked perfectly can you please advise.

    Just to recap, this is a collection of ports I have collected over time for people who needed this information when setting up the HP ePrint app so that they could view their email from within the app.  I am certain other applications also need this information.  Although lengthy, I could not find a more comprehensive place to retrieve this information.  Feel free to post additional information, faulty information, or other related topics below as this is simply a collection of data and it would be practically impossible to test all of them. Thank you!
    Don't forgot to say thanks by giving "Kudos" if I helped solve your problem.
    When a solution is found please mark the post that solves your issue.
    Every problem has a solution!

  • Enhancement to ADF ViewObjects

    An Additional enhancement request regarding ADF/BC4J.
    i would like to have ViewObjects that has INSERT MODE and QUERY MODE similar to Oracle Forms.
    When an Orcale Form is launched, a default new blank record is displayed on the screen and the only time data is fetched from the database is when u enter query mode and then execute the query. And that is using only one Datablock.
    In Oracle ADF/JSF, we can replicate that by setting the ViewObject maxfetchsize to zero upon creation of the ViewObject object. When the page associated with the viewObject launches, I will just execute a CreateInsert on pageLoad (invokeAction). To enter Query mode, I will have a backing Bean action that resets the maxfetch size to a positive number and then execute the query.
    Then I override the ViewObject's executeQuery() method so that after calling "super.executeQuery()", is will reset the fetch size again to zero.
    Now, my request is if the ViewObject can have this functionality BUILT-IN so that I won't have to create a custom backing bean action.
    regards,
    Anton

    Hi,
    I created bug 6066516 as an ER
    thanks
    Frank

  • Migration 9.0.3.3 - 9.0.4.0 : Problem with executeQuery()

    I have a problem with the viewObject.executeQuery() method.
    I have a viewObject "Response" with following SQL :
    SELECT response.target_id,
    response.survey_user_id,
    response.question_id,
    response.question_option_pos,
    response.response responsetxt
    FROM response
    WHERE response.target_id = :1
    AND response.survey_user_id = :2
    AND response.question_id = :3
    The I have following class :
    package ch.xxx.survey.webclient;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.ViewObject;
    import oracle.jbo.domain.Number;
    import oracle.jbo.Row;
    import oracle.jbo.client.Configuration;
    import java.sql.SQLException;
    import ch.xxx.survey.model.services.common.*;
    import ch.xxx.survey.model.viewobjects.*;
    public class DataManipulation {
    ApplicationModule applicationModule;
    public DataManipulation(ApplicationModule am) {
    applicationModule = am;
    public void insertUpdateResponse(Number targetId, Number surveyUserId, Number questionId, Number questionOptionPos, String response) {
    Number localQuestionOptionPos = questionOptionPos;
    String localResponse = response;
    //Search the question renderer
    ViewObject voQuestion = applicationModule.findViewObject("Question");
    voQuestion.setWhereClauseParam(0, questionId);
    voQuestion.executeQuery();
    String qRenderer = voQuestion.first().getAttribute("QuestionRendererId").toString();
    ViewObject voResponse = applicationModule.findViewObject("Response");
    //Search if the response already exists
    System.out.println("SEARCH : " + targetId + "/" + surveyUserId + "/" + questionId);
    voResponse.setWhereClauseParam(0, targetId);
    voResponse.setWhereClauseParam(1, surveyUserId);
    voResponse.setWhereClauseParam(2, questionId);
    voResponse.executeQuery();
    if (voResponse.getRowCount() == 1) {
    System.out.println("UPDATE TABLE");
    ClientResponseRowImpl row = (ClientResponseRowImpl) voResponse.next();
    System.out.print(row.getTargetId().toString());
    System.out.print(" / " + row.getSurveyUserId().toString());
    System.out.print(" / " + row.getQuestionId().toString());
    System.out.println(" / " + row.getQuestionOptionPos().toString());
    row.setQuestionOptionPos(localQuestionOptionPos);
    row.setResponseTxt(localResponse);
    row.getResponse().validateQuestion();
    } else {
    System.out.println("INSERT TABLE");
    ClientResponseRowImpl row = (ClientResponseRowImpl) voResponse.createRow();
    System.out.print("targetID=" + targetId);
    row.setTargetId(targetId);
    System.out.print(" / surveyUserId=" + surveyUserId);
    row.setSurveyUserId(surveyUserId);
    System.out.print(" / questionId=" + questionId);
    row.setQuestionId(questionId);
    System.out.print(" / questionOptionPos=" + localQuestionOptionPos);
    if (localQuestionOptionPos != null)
    row.setQuestionOptionPos(localQuestionOptionPos);
    System.out.println(" / response=" + localResponse);
    row.setResponseTxt(localResponse);
    voResponse.insertRow(row);
    row.getResponse().validateQuestion();
    public static void main(String[] args)
    ApplicationModule am = Configuration.createRootApplicationModule("ch.xxx.survey.model.services.WebClientModule", "WebClientModuleLocal");
    DataManipulation aDataManipulation = new DataManipulation(am);
    try {
    aDataManipulation.insertUpdateResponse(new Number("1"),
    new Number("1135"),
    new Number("144"),
    new Number("0"),
    "Yves");
    aDataManipulation.insertUpdateResponse(new Number("0"),
    new Number("1"),
    new Number("2"),
    new Number("3"),
    "xx");
    } catch (SQLException e) {
    e.printStackTrace();
    I run the main() method on JDeveloper 9.0.3.3 and all is perfect. The two "insertUpdateResponse" make an Insert.
    I run the same code on JDeveloper 9.0.4.0 and the result is wrong. The first "insertUpdateResponse" make an Insert and the second make an Update !!!
    The seconde executeQuery() find always one record (the first inserted record).
    The output is
    SEARCH : 1/1135/144
    INSERT TABLE
    targetID=1 / surveyUserId=1135 / questionId=144 / questionOptionPos=0 / response=Yves
    SEARCH :0/1/2
    UPDATE TABLE
    1 / 1135 / 144 / 0
    Any Idees ?
    Thanks Yves

    I'd suggest logging a TAR with Metalink so support can triage your testcase and try to get to the bottom of what's causing it. We're not aware of any upward compatibility issues at this time, other than the change in default behavior of the jbo.viewlink.consistent property from FALSE that it was in 9.0.3.3 to DEFAULT that it is in 9.0.4.
    The DEFAULT mode in 9.0.4.0 has viewlink consistency default to TRUE for views with a single non-reference entity usages, and FALSE for view objects with two or more non-reference entity usages.
    But if setting this setting back to false had no impact on your testcase, it must be something else that needs diagnosing.

  • Detail VO executeQuery question

    Hi
    I'm unclear on when executeQuery is fired for a detail ViewObject.
    In my project I've overridden executeQuery() in my detail ViewObject and expect it to fire each time there is a parent VO RowSet navigation event. I find this is not the case. The detail VO's executeQuery() method is only fired the first time it is called.
    Is the answer to create a Master RowSet navigation event listener in the Detail VO?
    thanks
    John

    A VL is a master RowSetIterator controlling a detail RowSet. When you navigate the master, then detailVO.executeQueryForCollection() is called with the detail QueryCollection (a frontman for the RowSet). So if you want to monitor that, you should override that method.
    Note that a call to executeQueryForCollection() doesn't necessarily re-execute the query. If the RowSet is marked dirty, the call returns a cached result from a previous execution.
    Sascha

  • ViewObject getting as row count zero ( JDeveloper 10.1.3)

    Hi All,
    In my code when i tried to get the viewobject rows, which had a viewlink created inside the code using the createLink() method, the viewobject is coming as with zero row count.
    I tried , vo.setRangeSize(-1) , vo.executeQuery() as well but still its not updated.
    But the same code is working in 9.0.4 not in 10.1.3

    Hi Frank,
    I am not sure whether its an upgrade bug or not...., is there any way to trace the this?.

  • Error with ExecuteQuery() in prepared statement

    Hello,
    i' m a new one at java. I' m trying to build a web application in jsp and i have a problem in a simple at log in authentication.
    My code is this:
    <html>
    <head>
    <title>Welcome to the online Boat Shop, Inc.</title></head>
    <body>
    <%@ page language ="java" import = "java.io.*, java.lang.*, java.sql.*" %>
    <% try
    String strUsername = request.getParameter("USERNAME");
    String strPassword = request.getParameter("PASSWORD");
    Class.forName ("org.apache.derby.jdbc.ClientDriver");
    Connection myConn = DriverManager.getConnection("jdbc:derby://localhost:1527/boatsdb","tony", "logo");
    String strSQL = "SELECT USERNAME, PASSWORD FROM BOATDB where USERNAME = ? and PASSWORD = ?";
    PreparedStatement stmt = myConn.prepareStatement(strSQL);
    stmt.setString(1, "USERNAME");
    stmt.setString(2, "PASSWORD");
    ResultSet myResult = stmt.executeQuery(strSQL);
    if(myResult.next()){
    out.println("Login Succesful! A record with the given user name and password exists");
    } else {
    out.println("Login Failed. No records exists with the given user name and password");
    myResult.close();
    stmt.close();
    myConn.close();
    } catch(Exception e){
    out.println(e);
    %>
    </body>
    </html>
    The problem is that prepared statement doesn't support executeQuery() method and i can find any solution. The error is this:
    java.sql.SQLException: Method 'executeQuery(String)' not allowed on prepared statement. I already have some data in my database so that it can return results.
    Thank you.
    Edited by: antonis on May 3, 2008 6:13 AM

    thank you, that was the problem. It seems that i have also done mistakes in passing the username and password from the forms to the database for checking, because the message that i get always when i log is that there is no user with this username kai password.
    <form method=GET action=log1.jsp>
    <font size=5> Username <input type=text name="USERNAME" size=20>
              </font>
              <br>
              <font size=5> Password <input type=text name="PASSWORD" size=20>
              </font>
              <br>
              <input type=submit name=action value="Submit">
    </form>
    That's the forms and combined with the code in the fist post should have worked. Any ideas?
    thanks again.

Maybe you are looking for