Problem with table of object

Hello

I wrote a calendar program using the table of object. Its storage name correct month in the object table. But when I store the date and run the program so that a single iteration, then it runs correctly and shows me the dates for the month of January. But when I run it for 2 iterations (IE it should show me the dates of January and February), it shows me the dates of February both times. Goes same for 3 iterations IE that it correctly displays the names of months but the dates are March for all 3 iterations. Can some body please guide me?Java Calendar.png

import java.applet.Applet;

import java.awt.*. *;

Javax.swing import. *;

class calendar {}

MonthName string;

String the day of the week [] = new String [31]; worst case

int [] dayNo = new int [31];

Calendar (String monthName1, String [] dayName1, int [] dayNo1) {}

monthName = monthName1;

day of the week = dayName1;

dayNo = dayNo1;

}

void display (int daysInMonth) {}

int i;

Dim str As String ="";

String str1 = monthName;

String str2 ="";

for(i=0; i<daysInMonth;++i)

' str2 = str2 + dayNo [i] + day of the week [i] + "";

Str = str1 + str2;

JOptionPane.showMessageDialog (null, "Inside" + str);

}

}

public class useCalendar2 {}

Public Shared Sub main (String [] args) {}

String [] months = {}

"January."

"February."

'Market ',.

"April,"

«Can»,

"June."

"July."

"August."

"September."

"October."

"November."

"December".

};

int [] daysInMonths = {31,29,31,30,31,30,31,31,30,31,30,31};

String the day of the week [] = {'My', "Tue", "Wed", "Game", "Fri", "Sat", "Sun"};

String [] dayNameEntireMonth1 = new String [31];

int [] dayNo1 = new int [31];

Calendar [] obj = new calendar [13];

int month, day, dayNameIndex;

dayNameIndex = 4;

Dim str As String ="";

for (month = 0; month < = 2; month ++) {}

for (day = 1; day < = daysInMonths [month]; ++ day) {}

dayNameEntireMonth1 [day 1] = day of the week [dayNameIndex];

dayNo1 [day 1] = day;

dayNameIndex ++;

if(dayNameIndex==7)

dayNameIndex = 0;

}

obj [month] = new calendar (month [months], dayNameEntireMonth1, dayNo1);

}

int i;

for (i = 0; i < = 2; ++ I)

obj [i]. Display (daysInMonths [i]);

}

}

I tried very hard, but I can't find the error. I have written other programs of object arrays, they work very well, but it has slain. Some body please guide me.

Zulfi.

Thanks it worked.

In my previous example, I was not store values, but here I store me values, so I have to use 'new' with data not primitive type i.e String.

import java.applet.Applet;

import java.awt.*. *;

Javax.swing import. *;

class calendar {}

MonthName string;

String the day of the week [] = new String [31]; worst case

int [] dayNo = new int [31];

Calendar (String monthName1, String [] dayName1, int [] dayNo1) {}

monthName = monthName1;

day of the week = dayName1;

dayNo = dayNo1;

}

void display (int daysInMonth) {}

int i;

Dim str As String ="";

String str1 = monthName;

String str2 ="";

for (i = 0; i<>

' str2 = str2 + dayNo [i] + day of the week [i] + "";

Str = str1 + str2;

JOptionPane.showMessageDialog (null, "Inside" + str);

}

}

public class useCalendar2 {}

Public Shared Sub main (String [] args) {}

String [] months = {}

"January."

"February."

'Market ',.

"April,"

«Can»,

"June."

"July."

"August."

"September."

"October."

"November."

"December".

};

int [] daysInMonths = {31,29,31,30,31,30,31,31,30,31,30,31};

String the day of the week [] = {'My', "Tue", "Wed", "Game", "Fri", "Sat", "Sun"};

String [] dayNameEntireMonth1 = new String [31];

int [] dayNo1 = new int [31];

Calendar [] obj = new calendar [13];

int month, day, dayNameIndex;

dayNameIndex = 4;

Dim str As String ="";

for (month = 0; months)<=11; month++)="">

dayNameEntireMonth1 = new String [31];

for (day = 1; day)<= daysinmonths[month];="" ++day)="">

dayNameEntireMonth1 [day 1] = day of the week [dayNameIndex];

dayNo1 [day 1] = day;

dayNameIndex ++;

if(dayNameIndex==7)

dayNameIndex = 0;

}

obj [month] = new calendar (month [months], dayNameEntireMonth1, dayNo1);

}

int i;

for (i = 0; i<=11;>

obj [i]. Display (daysInMonths [i]);

}

}

Tags: Java

Similar Questions

  • problems with table formatting

    Hi all

    I currently have problems with formatting or to use a table to record the data (well it will be saved in a .csv file, but I'm trying to use the table to get it all properly formatted to the .csv file for ease of reading). It is probably something easy I'm dominant or do not add. If someone with more knowledge of labview (I only worked a few months with her power) could guide me through the process of how to make my idea works, I would be very grateful.

    I've attached the labview file, so you can see what I'm trying to do and how I'm trying to approach it a little more.

    In addition, if you need a little more explanation, just ask.

    Thank you very much!

    At first glance, it seems that you have made more complicated it must be.

    You have a ton of controls and indicators that could be better managed as tables or groups.

    To your immediate problem of writing file, you could just build a digital table and then use the entry in the File.vi worksheet and select a comma as separator.  The step where you are creating the spreadsheet string and then write in the text file is not necessary.

  • Problem with table of waveform: time scale do not see the time correctly

    Hello

    I have some problems with a graphic.

    I want to display data, and the duration between two unique data can vary. It's something between 50ms and 500 ms.

    The problems I have:

    1. the time is not correctly displayed in the graph (allways 02:00:10 instead of the current time)
    2. the data points in the table have a distance of 1 s (x-scale). This is not correct.

    I've tried several things, but I thinkt that I am on the wrong track.
    Could you please help me?

    Johannes

    LabVIEW 7.1 (!)

    I'm sorry. The property on the left node was not necessary...

  • Problem with table/table and past data capture

    Hi all

    Newbie is back and I have a problem with my program.

    A brief introduction of what I'm trying to do.

    I'll show you a failure to a system event.

    Based on each event, I will need to connect the error description, the tag, the fault start time and duration.

    All the event information will be displayed on the front table and this table will increase when new event occurred.

    For descriptions and tags - this is fixed based on what fault affects, respectively.

    The issue I'm having is to capture time.

    What I have in mind is to use the time to enter the start time and duration also.

    Departure time is not question because once I press boolean = true, it gives the start time.

    For the duration, when I press boolean = false, it wil give the total duration.

    However, I have a problem as follows:

    (1) to capture what a comprehensive data set (for example / / Desc: fault 1, Tag: one, start time: 2008-12-16 11:15:06 duration: 0 00:00:05) and it passed inside the trap fault Table.

    (2) if the same failure has occurred, it will overwrite the latest information. However, I need to keep the display of old and new events.

    Please notify.

    Opinions and suggestions are welcome mosssssst.

    Million thanks in advance.

    Hi Roziela,

    Thanks for the post and I hope that your well today.

    You must add logic to detect the change of the event (no fault to fault) and produce a Boolean result by 'raising' edge.

    I have a code to do this,

    Let me know what you think,

  • Problems with tables in InDesign CS4

    Recently upgraded to CS4, I had problems with editing features in tables. The problem occurs after working on a table for awhile - where in a first time, I am able to change the color of the outline and weight very well, but then, after a period of time, it becomes buggy and I'm more able to bring additional features line/column, as changes not being not able to set the color of the outline to zero. The part-time work around, I've found is to leave InDesign and re-launch, and then reopen the document, how can I then change the traits of the table - but only for a while until the problem again and I have to repeat the process of exit and restart. I was wondering if anyone else has had a similar problem and could know a fix (or better work around), or if this is a known bug in CS4. I don't remember what is happening with the change table in CS3. Any help is greatly appreciated.

    I am not fond of the tables. Never been able to do the table styles work properly.

    My method to treat stroke selct the cells and use the proxy in the control panel to set the stroke or STROKE I want to edit, and then change the attirbutes. I find sometimes that I need to change the weight, sometimes the type of stroke, or sometimes even both. If you have applied a troke to a cell that is shared with another, then go in the other cell, I find that you must explicitly choose this feature again to change.

  • Problem with tables made in JHeadstart 10.1.3.3.87

    Hello

    We have recently upgraded from 10.1.3.3.52 to 10.1.3.3.87 (using JDev 10.1.3.4.0.4270) Jhs and have encountered a problem with a window using regions. We have containers horizontal region, vertical region containers, containers stacked area and parts of retail group. In these containers/parts tables are rendered not at all. When I compared the two versions of Jhs .jspx pages I noticed the 10.1.3.3.52 version was the following code (which works)

    < rendered af:panelGroup = ' #{(links. " AwardView1Iterator.*currentRowIndexInRange! =-1 * and links. "(AwardView1Iterator.findMode!='true')}" id = "AwardView1DetailGroupsBelow" partialTriggers = "AwardView1Table" >

    and the 10.1.3.3.87 version had the following as code

    < rendered af:panelGroup = ' #{(links. " AwardView1Iterator.*currentRow! = null * and links. "(AwardView1Iterator.findMode!='true')}" id = "AwardView1DetailGroupsBelow" partialTriggers = "AwardView1Table" >

    the problem seems to be in the following line in the horizontalRegionContainer.vm and stackedRegionContainer.vm-

    #JHS_PROP ($subRegion.rendered 'lent')

    as in line 33 of the horizontalRegionContainer.vm - < af:panelGroup #REGION_PARTIAL_TRIGGERS ($subRegion) * #JHS_PROP ('lent' $subRegion.rendered) * id = ' () #REGION_ID ${subRegion.name} PanelGroup "and
    as in line 32 of the stackedRegionContainer.vm - < af:showDetailItem text = "#REGION_TITLE ($subRegion) ' * #JHS_PROP ('lent' $subRegion.rendered) * #JHS_PROP ($' disabled' subRegion.disabled) #REGION_PARTIAL_TRIGGERS ($subRegion) id =" #REGION_ID () ${subRegion.name} tab ">"

    has anyone encountered a similar problem?

    Thank you
    Lana

    Lana,

    There is a service update 10.1.3.3.88 available on cso.oracle.com that should fix the problem.

    Steven Davelaar,
    JHeadstart team.

  • problem with recording new object database

    Hi all

    I am having some problems with registration of the database object.

    I have 2 classes

    {Test}
    Laboratory Lab - > not nullable in DB
    LastElement-> element (2 part)
    Items in collection-> (a-2-many element)
    }

    Element
    {
    String value
    Test parentTest-> (one to a test - key to building elements)
    }

    1. I create new Test ts1 and new element el1
    2. I add el1 ts1 items
    3. I updated el1 lastElement in ts1
    4 assignSequenceNumbers
    When I will I have an exception for the Insert for Test-> impossible to insert null for LAB_ID

    I found that if I do step 3 everything works fine and the INSERTION is done in a single step (all the attributes private and one-2-one References are included)
    If I do the step 3, only private attributes are generated for the insert and after insertion will update for all individual references. And it would be ok if I wouldn't not nullable fields.

    Is it possible to force Toplink do not separate first INSERTION to 2 calls?

    Any suggestions will be greatly appreciated.

    PS. all objects are correctly saved in UnitOfWork

    Thank you

    First of all you have parentTest in el1? You must take care of both sides of the relationship.
    Secondly, if you did and which does not help, maybe you can change a constraint not null on defered lab so he would be checked at the end of the transaction not to each insertion.

    Published by: sebastian.kolski on October 8, 2009 10:27

    Published by: sebastian.kolski on October 8, 2009 10:28

  • Problem with AddEventListener to objects using forEach array

    I have a file with a many cases of button, whose name I put it in 2 different tables.  I add an eventListener to each button dynamically using the forEach... instructions in the method.  I want the buttons in the first table to call a function and buttons in the second table to call a different function.  I do some compile errors, but my problem is that the buttons in the two tables call the two functions.

    < code >

    var btnList:Array = [cultivated, bBlue, AOR, bPurple, bGreen];
    var greenList:Array is [gb1, GB2, gb3, gb4, gb5, gb6, gb7, gb8, gb9, gb10, gb11, gb12, gb13, gb14];.

    for each type (var btnList b) //data in table buttons
    {
    addEventListener (MouseEvent.MOUSE_DOWN, btnOverHandler);
    addEventListener (MouseEvent.MOUSE_OUT, btnOutHandler);
    }

    for each (var gb:String in greenList) //data in table type buttons
    {
    addEventListener (MouseEvent.MOUSE_OVER, overHandler);
    addEventListener (MouseEvent.MOUSE_OUT, outHandler);
    }

    function btnOverHandler(evt:MouseEvent):void
    {
    If (btnList.indexOf (evt.target.name) < 0) / / check if evt.target is object table
    {
    trace ("mouse button down");
    }
    }

    function overHandler(evt:MouseEvent):void
    {
    trace ("mouse button plot on");
    }

    < code >

    You're not add event for buttons listeners - you add just them, so any object on the stage can trigger them.  In addition, your greenList isn't a list of string values that you will encounter problems at least two places in your code.

  • Problem with tables

    Hi all!

    I was doing a simple practic, it is a random 3D Board and the problem is that I can't properly use the index in real time with random numbers.

    Here you have two VI, the first is simple, it is a 3D picture, but if you want, you can change the rows or columns and you will see the element changing to the same table 3D.

    But in the second is the problem, here's another 3D painting, but it is filled with random numbers, and when filling it finished start more and, instead, I see all the loose of the original 3D array.

    How could I do that the picture of random origin remains until I want to generate the following, and before that I then generates the one that I can get all the digital changig loose control (pages, rows and coulmns)?

    Your VI is run once and then stop. If you want to update you choose index different values then you must encapsulate this part in a while loop with a stop condition.

    When you want to generate a different set of random numbers click the stop button, and then rerun the VI.

    I suggest you only start by reading some tutorials online on LabVIEW programming. They should teach you the basics.

    Start here: http://www.ni.com/gettingstarted/labviewbasics/

  • Problem with the C++ object to qml exponent

    Hello, I followed the instructions by Qml and C++ integration but got stuck at a certain time.

    Here is my code:

    // applicationui.cppPage* ApplicationUI::doLoadPageDetails(){
    
        qmlRegisterType("myHtmlPage", 1, 0, "HtmlPage");
    
        QmlDocument *qml = QmlDocument::create("asset:///PageDetails/PageDetails.qml").parent(this);
        qml->setContextProperty("app", this);
    
        HtmlPage *htmlPage = new HtmlPage();
        qml->setContextProperty("htmlPage", htmlPage);
    
        htmlPage->setHtml("*some html code*");
    

    This function creates a Page with a container that contains a WebView. Here, I want to fill the string saved as htmlPage.html.

    I created the RPC classes as described in the link and they work. When I check the htmlPage-> html() in C++, I get the string I wanted.

    Now, my problem is how to get this string for qml.

    Here's what I do:

    import myHtmlPage 1.0....Container {
    ....
            ScrollView {            visible: true
                WebView {
                    attachedObjects: [
                       HtmlPage {
                            id: htmlPage
                        }
                    ]
    
                    id: webViewScrollable1....
                    html: "" +
                    "" +
                   "*style options*" +
                    "" +
    
                    htmlPage.html +  //<----- this should give me the string I saved in C++ under htmlPage->html()
    
                    "" +
                    ""
                }
            }
    

    But nothing is displayed on the page. But why? I forgot to link something?

    I think you're getting confused in the difference between a property and recording a QML component.

    You do both.

    When you attach an object to a QML file, you create an instantiation of the object at this time, when you set a context property that you you already created that object and are just passing a reference to this.

    So when you join HtmlPage in your QML file you create a new object and does not reference that you have created in your program C++ part, so no text.

  • Problems with aligning an object/array and a popup error message of Muse

    I will try to describe my two problems as simply as I can

    Problem 1.

    I create a mobile version of a Web site, I'm muse, after it is created, I went in the php file to change the details.

    I've gotten to the point where everything works but I'm unable to align to the left of the table in the middle.

    Now when I inspect element I see and point high (photo 1) the ' < table "tag with all that it contains, but when I go into the php file I can't see what

    (photo 2). How can I change or add a tag that will align to the left of the table?

    (www.avocabeachpicturetheatre.com.au/session-times-3.php)

    Problem 2.

    When you go to the page (both on mobile and desktop computer), I gives me an error message, I was able to change the text, but not get rid of it, as far as I can understand that it's something to do with the muse

    (photo 3)

    How can I get rid of this?

    image 1 below

    1.png

    Image 2 below

    2.png

    Image 3 below

    3.png

    The problem, Ben, is that the page that contains the table is include file is generated dynamically. Unless Dale find the script that generates it, there is no way to change the value of the align attribute.

    A possible solution is to add the following JavaScript just before the tag closing session-times - 3.php:

    
    

    It is not an ideal solution, but it works.

  • Problem with table tree ADF

    Hello

    I have following scenario.

    I have two read only vo (expert mode, not based on the entity) with a link between them. I want to display the data in a tree with checkboxes to parent nodes and child table. When the user selects a check box to the corresponding parent node with child nodes checkboxes should be auto selected.for achieve this I created transient Boolean attributes on two VO on the user interface layer, I use the Valuechangelistner to get the records of the child and the update of the transitional attribute.but, the problem is that the selection does not occur on the UI for the child node check boxes.

    Here is the code for updating the transient attributes.

    {} public void deptSelected (ValueChangeEvent valueChangeEvent)
    Add the code in the event here...
    DCBindingContainer bc = (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();
    Iterator DCIteratorBinding = bc.findIteratorBinding ("DepartmentVOIterator");
    Region of DepartmentVORowImpl (DepartmentVORowImpl) = iterator.getCurrentRow ();
    RowIterator ri = region.getEmployeesVO ();
    String ID = null;
    {if (valueChangeEvent.getOldValue ()! = null)}
    Check Boolean = (Boolean) valueChangeEvent.getNewValue ();
    if(Check==true) {}
    region.setisDeptSelected (true);
    }
    Else if (check == false) {}
    region.setisDeptSelected (false);
    }
    {while (RI.hasNext ())}
    EmployeesVORowImpl empRow = ri.next ((EmployeesVORowImpl));
    if(Check ==true) {}
    empRow.setAttribute ("isEmployeeSelected", true);
    }
    Else if (check == false) {}
    empRow.setAttribute ("isEmployeeSelected", false);
    }}

    }

    }

    whenever the parent is checked valueChangeListner to fires and but the changes don't get triggered on the user interface. I suspect that some how the viewlinkaccesor is getting executed and transitional attribute values are lost.

    Guidance on the question?

    Thank you

    Sam.

    Sam, your question a bit sounds like something that I did in my last project.  I have a treeTable with two columns with components selectBooleanCheckbox.  Mine has the boxes with render = "false" for the parent nodes, but I see no reason why you couldn't do what you want with the parent nodes.

    The key is in the bean support - the value attribute of the boxes should be a map, so you can have individual values for each node.  So, I have:

    Map reqServices = new HashMap();
        public void setReqServices(Map reqServices) {
             this.reqServices = reqServices;
         }
         public Map getReqServices() {
             return reqServices;
         }
    

    And on the page, the elements are similar:

                
                    
                
    

    Note this node. ConduitePlan is the index of the card, so when you process the card value is true if the checkbox for that conduitePlan has been verified or does not exist in the map or is set to false if the box is unchecked.  It is added to the card when the user first checks the box, it changes to false if the previously checked box is unchecked.  You will probably use a ValueChangeListener to check the child nodes when a parent node is activated.

  • Problems with tables of Menus and Menu items

    The short story's I am a graphic interface for application design, it has a lot of menus and menu by menu items.
    I thought as in normal Java, I could simply do an array of Menus and many of the menu items. My problem is that it compiles fine, but spreading tons of exceptions. I use Netbeans as my IDE.

    Here is a sample of my code. Is not all that, but that's the part I have printing has problems since he worked before moving to tabular form.




    [Menus] Menu = Menu new [11];
    menus [0]. SetText ("file");
    File [] = new MenuItem MenuItem [8]; DEFINITIONS FROM FILE MENU


    file [2]. SetText ("Open"); Open
    file [2] .setOnAction (new EventHandler < ActionEvent > () {}
    @Override
    {} public void handle (ActionEvent arg0)

    Element 'FileChooser' fc = new FileChooser();

    File = fc.showOpenDialog (primaryStage);

    }
    });

    leader [2] .setAccelerator (null);



    menus [0]. GetItems(). AddAll (file);

    Menu bar bar of menus = MenuBarBuilder.create)

    . Build();




    menubar.getMenus () .addAll (menus);


    VBox vbox1 = VBoxBuilder.create)
    . Children (MenuBar, scrollPane1, BTN)
    . Build();


    ap.getChildren () .addAll (vbox1);


    in any case the stuff compiles fine without error. But Netbeans spit exceptions as a guy who ate a bottle of ipecac and the bombs of programs.
    Here are some of them.

    Exception in the method of Application startup
    java.lang.reflect.InvocationTargetException
    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.javafx.main.Main.launchApp(Main.java:642)
    at com.javafx.main.Main.main(Main.java:805)
    Caused by: java.lang.RuntimeException: Exception start Application, method
    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:403)
    to com.sun.javafx.application.LauncherImpl.access$ 000 (LauncherImpl.java:47)
    to com.sun.javafx.application.LauncherImpl$ 1.run(LauncherImpl.java:115)
    at java.lang.Thread.run(Thread.java:722)
    Caused by: java.lang.NullPointerException
    to javafxapplication2. JavaFXApplication2.start (JavaFXApplication2.java:37)
    to com.sun.javafx.application.LauncherImpl$ 5.run(LauncherImpl.java:319)
    to com.sun.javafx.application.PlatformImpl$ 5.run(PlatformImpl.java:206)
    to com.sun.javafx.application.PlatformImpl$ 4.run(PlatformImpl.java:173)
    at com.sun.glass.ui.win.WinApplication._runLoop (Native Method)
    in com.sun.glass.ui.win.WinApplication.access$ 100 (WinApplication.java:29)
    to com.sun.glass.ui.win.WinApplication$ $3 1.run(WinApplication.java:73)
    ... 1 more
    Result of Java: 1

    I don't really know what to do. I would like some recommendations.
    If possible I would still use arrays of Menus and Menu items, but if this is not possible, I would like to know and understand why not.

    (Sorry, that swapped with your previous message).

    You have a NullPointerException because you try to reference menus [0] when it has not been initialized:

    Menu[] menus = new Menu[11] ;
    

    creates a reference to an array of 11 Menus, but not initialize them. So, each element of the array is null.

    menus[0].setText("File");
    

    throws a NullPointerException you are trying to call a method via an object reference (menus [0]) that is set to null.

    You need

    Menu[] menus = new Menu[11];
    menus[0]=new Menu();
    menus[0].setText("File");
    // or just replace those two lines with menus[0]=new Menu("File");
    

    and similarly, no doubt, for all other elements in the menus array.

    You have problems similar to sets of menu items.

    Edited by: James_D October 31, 2012 12:00

  • Weird problem with table

    We never seen anything like this?

    I wrote 2 nested loops at the end of which an object is added to a table.

    But for some reason, when everything is done, all objects in the table are exactly the same, it has mutiple, but they all have the same values and the reference number... I'm really confused as to why this would happen, I must have it over a thousand times and never seen anywhere else.  I got the other guy that flex look as well... and he did not see why either, in fact he said that he «did more than a thousand times...» "And you get the picture.

    Here's my segment of the loop if anyone can see why this happens please tell me.  Thank you.

    It's the Flex 3 version:

    ------------------------------------------------------------------

    to loop through the grid

    var i: int = 0

    for (i = 0; i < gridData.length; i ++) {}

    loop if date of deliverables and enter values where they exist for each project or line of gridData

    var gTemp:Object = Object (gridData.getItemAt (i)); //gridDataVO

    var j: int = 0;

    for (j = 0; j < tempQueue.length; j ++) {//loop through tempQueue, holds deliverables }

    var qTemp:Object = Object (tempQueue.getItemAt (j));

    inspect all deliverables for each project line and create a new object and push in table.

    var s:string = ce . parentApplication.mGrid.elGetAppName (qTemp.eventID); //This function retrieves just the value of appfield

    if (gTemp [s] == null | gTemp [s] .length == 0) {}

    qTemp =

    null ; //do nothing

    }

    else {

    qTemp.projectID = gTemp.pdNO;

    qTemp.dueDate = gTemp [s];

    workQueue.addItem (qTemp);

    qTemp =

    null ;

    }

    //

    }

    for

    gTemp =

    null ;

    }

    for outdoor

    ----------------------------------------------------------------------

    essentially the collection of table leader ends with still objects when this is done.

    While tempqueue was already the same object?

  • Problem with table with XMLTYPE column extractvalue.

    I don't know there is a simple answer, but I have problems
    extract data from a column of xmltype type.
    I have two tables
    descr dab_xml
    Name
    -----------------------------------------------------
    XMLTYPE TABLE
    descr dab_test
    Name
    -----------------------------------------------------
    A NUMBER
    NUMBER OF AB
    CLOB DATA
    DATA2 VARCHAR2 (1600)
    MYXML XMLTYPE

    I inserted the Oracle XML purchaseOrder.xml example in the two dab_xml
    and the myxml in dab_test column.

    When I run the following:

    SELECT extractvalue (OBJECT_VALUE, ' / PurchaseOrder/reference "")
    OF dab_xml;

    SBELL-2002100912333601PDT returned

    When I run the present:

    SELECT extractvalue (OBJECT_VALUE, ' / PurchaseOrder/reference "")
    FROM (select dab_test myxml);

    ERROR on line 1:
    ORA-00904: "OBJECT_VALUE": invalid identifier

    Why are the two different?

    Any help will be appreciated.

    Kind regards

    David

    In short, you want to

    SELECT extractvalue(myxml, '/PurchaseOrder/Reference')
    FROM dab_test;
    

    This difference is that for dab_xml, it has no columns defined for the table, so you are [OBJECT_VALUE | http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/pseudocolumns006.htm#sthref830] as an alias for a column does not exist.

    With dab_test, you have a column that contains the XML, you must use this column instead of OBJECT_VALUE name.

Maybe you are looking for