Increase array size dynamically

Hi Sir,
Balance is the class and current[]
is my array of object of class balance.
Balance current[] = new Balance[2];
Instead of assigning 2 to the array,
I only know the number of items in array
as I loop through my resultset.
So, meaning I don't know the array size
in before I create the array.
So, I need to increase the size of the
array as I loop through the resultset.
How can I achieve this?
Please advice.
Thanks.
null

get the ScrollableRowsetAccess from the ResultSetInfo and later you can get the getRowCount() with this number you can create the right size of the the array with the total of rows on the RowSetInfo or a ResultSetInfo. If your query is going to be growing after that point, you should better consider use vectors.
Carlos

Similar Messages

  • How to increase Array  size while copying from remote table

    Hi everyone,
    I am using remote copy to copy 900,000(9 millions) records to local data base ,but it is taking long time obviuosly. The message i see while copying is
    Array fetch/bind size is 15 (array size is 15)
    can Array size be changed to make copy faster or
    any otherway to copy 9 million reocrds fastly?
    regards,
    Karna

    I guess that you are using the 'copy' command in sql*plus.
    1. You could export the remote table and import the data into your local table. That perhaps would be efficient.
    2. You could increase the array size for example,
    SQL> show arraysize
    arraysize 15
    SQL> set arraysize 5000
    SQL> show arraysize
    arraysize 5000
    SQL> What is the value for sql*plus option 'copycommit'?
    SQL> show copycommit
    copycommit 0
    SQL>

  • Increase mainwindow size dynamically

    hi all,
    can we increase the mainwindow size dynamically.
    for eg: my requirement is if there is 1 line item, the size of main window should suppress.
    if there r more than 10 line items the size should increase.
    is it possible or not.
    thanks in adv
    vidya

    Hi
    It will increase to multiple pages depending on the data.
    If it is even one line it will display one page and show the output
    So you can't make to restrict it to one line if the data is one line. it will be the size what you defined in page windows per page.
    Regards
    Anji

  • Increase array size

    Hi, I need to create an arrayat the start of the program with a specified size how ever if it get too small I need to increase the size without loosing the contents of the array.

    Using Vector probably is the best way to go. However, if you must use an array, you could "borrow" from the code in Vector.
    e.g to make an array larger
    Object oldArray[] = existingArray;
    existingArray = new Object[newCapacity];
    System.arraycopy(oldArray, 0, existingArray, 0, oldArray.length);You might think that it's a good idea to wrap your array in a custom class that can automatically make the size larger. If you do, then you're re-implementing Vector!

  • How to increase the size of a String[]

    I'm using a String[] variable that I do not know the maximal size, but i need to increase its size, how can I do that
    ex:
    String[] buffer = new String[]
    int i= 0;
    while (<condition>) {
    ???? // increase the size
    buffer [ i ] =.....
    }

    There is no way in Java to actually increase or decrease the size of an existing array. You'll have to create a new array of the appropriate size and copy elements of the first array into it, for example by using System.arraycopy.
    Or you could give your array a big enough size at start, so you won't have to do the above.
    A better idea would be to use a collection instead of an array (like an ArrayList) in the first place.

  • Setting array size, effect on memory

    Does setiing the array size to a huge no has any affect on the memory, performance and is it considered good programming. If not what are the other options?
    String [] arrayString = new String [2354];

    Your question is rather ambiguously worded.
    In Java arrays cannot be resized, so you should set the array to the exact size you need. If you need a huge array, create one. If you need a small array, create one. If you don't know how large it should be, or need it to be dynamically sized, use any of these great classes - ArrayList, HashMap, HashSet, etc... Try reading the Java API documentation on these classes...
    And yes, when you create a huge array, it actually allocates the space for each element in the array right then, and in fact initializes each with the default values of null, zero, or false depending on the type of the array.

  • How to increase font size in Java script alert message

    Is anybody know how to increase font size in Java script alert message
    THanks in Advance ....

    Hi,
    You can NOT do it with Javascript.
    You need an alternative solution: http://www.apex-plugin.com/oracle-apex-plugins/dynamic-action-plugin/popup-box_84.html
    Tobias

  • How to increase Heap size at runtime

    Hi,
    In my application i sometime require to parse large XML files,so for doing that i require to increase the heap size dynamically.Is there any way to do that ?
    Thanks in advance
    Gurpreet Singh

    And unless there is no reason to be swapped out
    (plenty of physical memory) then it will be swapped
    out.I don't understand this. If there is no reason to
    swap a page back to the disk - e.g., there is plenty
    of available phyiscal memory for some other process -
    then why would the OS bother to swap that page back
    out to the disk?Ok I don't understand the statement either :)
    So obviously I need to rephrase it.
    Page swapping only occurs when needed. If there is plenty of physical memory to hold everything, then swapping does not occur.
    On the other hand if there is not enough physical memory then pages will be swapped out.
    >
    And application can also tell the OS that it nolonger
    wants to use some memory (pages.) But what doesthis
    gain the application? After all if it kept thememory
    and simply did not use it, it would not affectother
    applications. That is because the memory isswapped
    out to the harddrive until needed. So there is no
    need for an application to return memory to the OS.But since virtual memory is finite and there is a
    performance overhead if there is frequent swapping of
    pages into physical memory and out from the disk
    (thrashing), overall performance/throughput degrades.Some what correct. First virtual memory has a finite limit. But that limit itself does not affect other applications.
    Virtual memory in of it self does not cause swapping. If I allocate 1 gig for my application, when my application runs it will not have 1 gig of physical space. Only the memory that is 'touched' is relevant to the OS. So during a time slice it might be the case that only 16k of actual physical memory is used - say 8k for the small piece of code running and 8k for data (an over simplification but appropriate for this discussion.)
    It is rather unlikely, perhaps even impossible, that the entire 1 gig of memory would be swapped into memory during a single time slice.
    If the process' consumption of memory can not be
    streamlined, then that's typically when people go and
    buy more physical memory, no? Or in some cases,
    increasing the amount of virtual memory available to
    the OS can alleviate the problem.There is a difference between requesting memory and using memory. Memory that is used ('touched') is the only thing that has to be in physical memory. If you do indeed use a lot of memory in your application then more physical memory will help. But simply requesting more memory doesn't impact physical memory.

  • How to increase the size (Length and width)  of check box

    Hi All,
    I have to increase the size of ( width and length) of check box, I have revised to check box topic in dev guide but didnt find any clue, i have also tried to use CCStyle class but that is also not working, I would appreciate if some can help me out on this. Thanks in advance , let me know if any clarification required.
    Thanks
    Pratap

    Hi Pratap ,
    I honestly don't know how to increase the size
    But i am giving you an alternate solution : we can create two Images with check box type 1 ) with checked
    2 ) with unchecked . ( you can create image of any size ) and get them displayed on OAF screen dynamically using switcher case .
    Dynamically displaying image will give the illusion of check box being checked and unchecked .
    keep this image moved to following media directory
    eg : /oraapp/mfgtestcomn/java/oracle/apps/media .
    Implement the switcher case , add the fire action to this Image Column , create a transient attribute and attach to this
    column . Depending on the value returned by transient attribute display the image on the column .
    Let me know if its not clear .
    Keerthi

  • Increase the size of textview

    Hi all,
    I was trying to increase the size of a dynamically created textview.Is it possible to set the width of a textview in webdynpro?
    Thanks
    Kukku

    Hi,
    Try this code:
    IWDTextView txtView = (IWDTextView)view.createElement(IWDTextView.class, "text_view");
           txtView.setWidth("Your_Desired_width");
           txtView.setDesign(WDTextViewDesign.HEADER3);
    If you already have the text view created then you can get that particulat textview and can use the same API's, Use this code:
    IWDTextView txtView = (IWDTextView)view.getElement("NAME_OF_YOUR_TEXT_VIEW");
           txtView.setWidth("Your_Desired_width");
           txtView.setDesign(WDTextViewDesign.HEADER3);
    This will solve your issue. Please revert back incase you want any further assistance.
    Thanks and Regards
    Pravesh

  • How to implement large array in Dynamic programming

    Hi, there
    I am working on my dynamic pogramming codes using Java. The code is getting work, but the spead is very slow.
    It is supposed that the very long time run is due to the large array implementation in my codes. Most times, I have two double arrays size up to 320000, and one array of class the same size.
    Each iteration could take 30 minitues, the whole optimaization needs up to 50-100 iteration to get converged.
    Could any experise help me to how to improve the memory performance in Java?
    That is very important for my research.
    Looking for very quick response.
    Cheers
    Jack from Edinburgh

    An array of 320000 doubles isn't considered a large array. It must be
    somewhere in your algorithm implementation that slows down your
    process. Some relevant code snippets could clarify things ...
    kind regards,
    Jos

  • How to get the byte[] size dynamically from the StreamMessage object

    Hi all,
    Using JMS, I am receiving the FDF file as StreamMessage from the queue and attaching it to the PDF file which is present in the local system.
    For that, I have written the code as follows:
    {color:#0000ff} Message msg = jmsTemplate.receive();
    if(msg !=null && msg instanceof StreamMessage)
    StreamMessage message = (StreamMessage) msg;{color}
    {color:#ff6600}//hardcoded the byte array size value
    {color}{color:#0000ff} byte[] bytes = new byte[{color:#ff0000}856{color}];
    System.out.println("read msg="+message.readBytes(bytes));{color}
    {color:#0000ff}PdfReader pdfreader = new PdfReader("D:\\Managing_Workflows_No_Comment.pdf");
    PdfStamper stamp = new PdfStamper(pdfreader, new FileOutputStream("D:\\12345.pdf"));
    FdfReader fdfreader = new FdfReader(bytes);
    stamp.addComments(fdfreader);
    {color} {color:#0000ff} stamp.close();
    {color}{color:#000000}The above code is working fine except with the hardcoded of {color:#ff0000}byte array{color}{color:#ff0000} size value{color} which is given in {color:#ff0000}RED{color} in color.
    Can anybody know, {color:#000000}*how to get the byte[] size dynamically from the StreamMessage*{color} object ?
    Any help would be highly beneficial for me !!!!
    Thanks and Regards,
    Ganesh Kumar{color}

    When you create your stream message you could add an property to your message, something like streamSize that would contain the number of bytes in your stream message. Then you could get this property from the message before declaring your array.
    Tom

  • How to change array size in forms6i

    Does anyone know how to change the array size in Forms6i.
    The only runtime option i see is Array=YES (Use array SQL processing). But I want to increase the number of records per request retrieved. There's supposed to be a 'Query Array Size' parameter but I have no clue where to find this ...
    kind regards

    Kurt, it may sound an obvious point to make but - did you even consider the on the help??
    We spend a lot of effort in producing this and it should be the first stop for quesions.
    Bring up the help, click on index and then type in "QUERY ARRAY" - and the list automatically moved to the topic you want.
    Regards
    Grant Ronald
    Forms Product Management

  • Change item size dynamically

    Hii All
    I need to change an item size dynamically. For eg. If i have an item size (width) 20 and i entered text of 100 alphabates then the size of item is increase dynamically along with text.
    I use set_item_property but it shows an error that *" Cannot resize item. Position of item places it off of canvas. "*
    Please Assist.
    Pradhyumn

    write both the actions at the same time
    if the canvas size is less then the field size plus the increament then increase the size of the canvas tooo...

  • Increasing the size of the SGA

    I'm using the Oracle Enterprise Manager Database Control on a 10.2.0.4 instance running on Redhat Enterprise Linux. One of the recommendations that the AWR\ADDM always seems to give is: "Increase the size of the SGA by setting the parameter SGA_TARGET to N". I've gone through the process twice already by upping the SGA_MAX_SIZE and SGA_TARGET parameters. It's currently recommending to up it to 6176M, I have not done this yet.
    (1) Is this one of the recommendations that you would ignore within the DBCA if performance of the database seemed acceptable?
    (2) Why does it always come back from the AWR\ADDM as a recommendation?
    (3) What SQL or performance statistics does it do to determine whether the SGA is undersized and how does Oracle determine the SGA recommended size that shows up in the ADDM feedback?
    Thanks in advance...

    Truely new questions do deserve new threads. Questions that are a direct result of responses to the initial question should be asked on the same thread.
    If there has been a time gap between the last post on the initial thread and the new question coming to mind then a new thread is probably the better choice.
    To answer the question asked if the database is not suffering ORA-04031 errors and performance is OK then I would ignore the recommendation to increase the size of the SGA yet again.
    What you might want to do first is reivew how the sga is being used (v$sgastat) and look for bad code technique that leads to needing memory, i.e., the use of SQL that passes constants to Oracle in what would otherwise be the same SQL statement if a bind variable was used and excessive use of Dynamic SQL when again bind variables could have been used in the SQL.
    IMHO -- Mark D Powell --

Maybe you are looking for

  • OEM Apple nVidia GeForce 7300 GT is on Adobe's list of unsupported GPUs for Open GL rendering-

    My Mac Pro's Radeon X1900 XT is retired to my computer grave yard, in my basement, but going back to the OEM Apple nVidia GeForce 7300 GT, which shipped with my Mac Pro, brought some encouraging results. When I first got the 2007 Mac Pro, in 2009, I

  • Iphone wont open after upgrade

    Process:         iPhoto [297] Path:            /Applications/iPhoto.app/Contents/MacOS/iPhoto Identifier:      com.apple.iPhoto Version:         9.4 (9.4) Build Info:      iPhotoProject-701064000000000~2 App Item ID:     408981381 App External ID: 10

  • Decentralize warehouse management

    Dear Friends, This is the question related to warehouse management system. My requirement is that we are going to set decentralize management. Presently we are having CWM in our present system. At another place there is local ERP , we want to replace

  • Oracle 8i - Tomcat 5.5 - Euro sign problem

    Hello, I've this configuration : Oracle 8i - Tomcat 5.5. I try to read/write a Euro sign (€) in my database but all I see is a strange sign (like ? inverted). I've no problem with accented characters. With Tomcat 6 the problem don't exist, but I have

  • Best way to handle Interface Return Type for Web Service Method

    Hi All, i have the followinig situation. I would like to create a method as a web service: Customer getCustomer(someType){....} ie: getCustomer method, with a parameter that indicates some backend data source. The method returns a Customer object. Ho