Newbie question: Binding very large strings ( 4k) to OLAP query

Hi there guys
I am using Oracle 10.2 and I am trying to bind string variables to olap literals in my query string:
SELECT TRUNC(IND-TO_DATE('01011900','ddmmyyyy')+2),VAL1
               FROM (
                    SELECT *
                    FROM TABLE(
                         OLAP_TABLE(
                              'OLAPFAME.MAG_CRD DURATION SESSION',
                              :1 ))
                         MODEL
                              DIMENSION BY(IND)
                              MEASURES(VAL1,R2C1)
                              RULES UPDATE SEQUENTIAL ORDER())
               WHERE OLAP_CONDITION( R2C1, :2, 1 )=1
I try and setString() to params 1 and 2, but it doesnt seem to work. The reason I am trying this is because when I pass large (>4K) DML string literals inline, I get ORA-01704. Hence me trying to bind to the variables via prepared statements (not even sure if this will get me past this 4k problem)!
I have also read that I can store these large strings in variables and use those as a OLAP DML string via the ampersand syntax (not sure how to do this, ensuring that they would just have statement scope).
Sorry if this is obtuse, but I'm at my wits end after a long days "trying stuff" :(
Thanks in advance
Adam

Once again, I answer my own question. -_-;;
The second process (fetch_comments) seems to be unnecessary. The Automated Row Fetch seems to be able to handle the 32K by itself. I'm still curious why the second process didn't work though....

Similar Messages

  • To count number of occurances of a char in a very large string

    Hi All,
    I like to count the no of occurances of a char in a a very large string.
    for example
    char ch - 'c'
    string str - "practical example is always needed"
    c occured 2 times in the above string.
    Thanks,
    J.Kathir

    > string str - "practical example is always needed"
    Try to finish this:
            String str = "practical example is always needed";
            char search = 'c';
            int occurrence = 0;
            for(int i = 0; i < str.length(); i++) {
                // Use a method from the String-class to get a
                // char from a specific location in the String.
                // See: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html
            System.out.println("Occerrence of char "+search+" in \""+str+"\" is: "+occurrence);

  • Very Large String

    I have a String that is suppose to hold info of about 200 MB, but when the string grows my program crashes giving a OutOfMemory Exception.
    Is there some JVM configuration that will help me solve this problem?
    Or will shifting to Java5.0 help solve this sort of problems.
    I understand that I have 128MB RAM which is lesser than 200MB what my program demands but I dont expect it to crash.

    I have a one-gallon tank of water, which is less than
    the five gallons I want to fill into it, but I don't expect it to overflowI very well understand what I am asking for.... I
    expect my system (program) to become slow because I
    guess we all know what Virtual memory stands for?Yes, very slow memory. o_O
    I dont expect the JVM to be decision maker of when to
    stop my application.It isn't.
    You did not tell the JVM to allocate enough heap to hold objects that large.
    You are free to configure your system with a large swap area
    and tell the JVM to allocate a large heap.
    Not sure if that will succeed though
    (AFAIK the JVM requests a contiguous memory block for the heap - your success might depend on your OS).
    Note, if you are building a large String, you should probably be using the StringBuffer class.
    If your largest object is expected to be in the order of 200MB in size, you'll probably need a heap size in the order of half a gig.
    Or will shifting to Java5.0 help solve this sort of problems.No, Java 1.5 will not alleviate your resource / configuration difficulties.

  • Very Quick Newb Question - Converting Float to String

    I created a small program that converts currency for the iPhone. Unfortauntely, I cannot get the UILabel to display my float value. Apparently, NS can though. I found a tutorial that told me simply to use this:
    [label setFloatValue:currency];
    label is the UILabel
    currency is the float value
    When I do that with the iPhone SDK, I get this error:
    warning: 'UILabel' may not respond to '-setFloatValue:'
    messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments.
    Any quick advice would be appreciated!
    Message was edited by: hollafortwodollas

    Simple requirements:
    label.text = [NSString stringWithFormat:@"%f", floatValue];
    More complex example:
    NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
    [formatter setFormatWidth:2];
    [formatter setPaddingCharacter:@"0"];
    [formatter setPaddingPosition:NSNumberFormatterPadBeforePrefix];
    lable.text = [NSString stringWithFormat:@"%@:%@:%@",
    [formatter stringFromNumber:[NSNumber numberWithInt:hours]],
    [formatter stringFromNumber:[NSNumber numberWithInt:minutes]],
    [formatter stringFromNumber:[NSNumber numberWithInt:seconds]]];

  • Very large string to internal text table

    Hi,
    I have a string that contains all the information read from a flat file and I want to put all that information in an internal table where each row is just 1024 char in order to contain a row of the original flat file.
    In the string I can recognize the special character "carriage return" in order to separate identify each row but now my problem is that I don't know can I parse the string text.
    Can you help me please?

    hi marshal ,
    do like this first read the internal table and replace the all occurencse of carriage return with '#'  and split the string
    at '#'.
    constant : c_enter type c ,
                  c_hash  type c value '#' ..
    data:
      BEGIN OF wa_text ,
              text(1024) TYPE c,
      END OF wa_text.
      i_text LIKE STANDARD TABLE OF wa_text.
    REPLACE ALL OCCURRENCES OF c_enter
                IN wa_text WITH c_hash.
    SPLIT wa_text AT c_hash INTO: str1 str2 str3,
                              TABLE i_text.
    regards,
    sandeep
    Edited by: Sandeep patel on Jul 14, 2008 12:43 PM

  • Checking a Sub String in a String of a very large file ?

    Hi All,
    I am having a 20mb file and i am coverting that 20mb file to a string.now i like to search whether the following substring appears in the string
    a) One
    b) Two
    c) Three
    I am just checking with String.indexOf() for each .
    Is there is any other efficient way of searching this rather than the above method String.indexOf
    please give me some suggestion how to perform searching in a very large string.
    Thanks,
    J.Kathir

    We have to read line and check for the three strings
    right ?
    Is there is any other way to check the substring in
    the whole string ?
    Reading line by line and searching for the three
    strings or Reading the entire file as string and
    searching for the substring
    which is better ?Depends on your definition of "better" - reading line by line saves memory, but is probably slower. Reading the entire file into memory then searching it is probably faster but takes more memory.
    As a third option, if you're using version 1.5, you can use the Scanner class to read the file and search for all 3 strings at the same time...something like this:
    Scanner scn = new Scanner(new File("myfile.txt"));
    String regExp = "a|b|c";
    String s;
    while ((s = scn.findWithinHorizon(regExp)) != null) {
      System.out.println("Found: " + s);
    scn.close();I'm pretty sure this is more efficient as it looks for anything matching the regular expression as it goes through the String...but I haven't done any timings on each approach.

  • Passing a large string in URL

    Hi
    The scenario is as follows
    There are two servers A and B on different locations. From Server A i want to send a request to a url on server B. The request contains a string parameter of very large value (more than 255 characters). The problem is that I cant use a get because of the restriction.
    How can I do the above in a jsp page. The string is generated dynamically when the user clicks on a link and also contains special characters like (+%)
    I know i need to encode the url. But how do i post to a url on a different server
    It would be nice if i can get the complete code. Short of time and cant read much thrugh the docs :)
    Thanks
    Sairam

    That depends, what type of field are you inserting the string into? What you need to do is check the size of the field and the length of the string. If the length exceeds the field size, then you either need to increase the field size or, if you know you will be generally inserting very large strings, change the field to a clob. Hope this helps.

  • Very Large Numbers Question

    I am a student with a question about how Java handles very large numbers. Regarding this from our teacher: "...the program produces values that
    are larger than Java can represent and the obvious way to test their size does not
    work. That means that a test that uses >= rather than < won?t work properly, and you
    will have to devise something else..." I am wondering about the semantics of that statement.
    Does Java "know" the number in order to use it in other types of mathematical expressions, or does Java "see" the value only as gibberish?
    I am waiting on a response from the teacher on whether we are allowed to use BigInteger and the like, BTW. As the given program stands, double is used. Thanks for any help understanding this issue!

    You're gonna love this one...
    package forums;
    class IntegerOverflowTesterator
      public static void main(String[] args) {
        int i = Integer.MAX_VALUE -1;
        while (i>0) {
          System.out.println("DEBUG: i="+i);
          i++;
    }You also need to handle the negative case... and that get's nasty real fast... A positive plus/times a positive may overflow, but so might a negative plus a negative.
    This is decent summary of the underlying problem http://mindprod.com/jgloss/gotchas.html#OVERFLOW.
    The POSIX specification also worth reading regarding floating point arithmetic standards... Start here http://en.wikipedia.org/wiki/POSIX I guess... and I suppose the JLS might be worth a look to http://java.sun.com/docs/books/jls/second_edition/html/typesValues.doc.html

  • Very large XML String parameters

    Hi !
    I'm using AXIS 1.x, websphere 5 --- The problem is - when i call webservice with xml (String) parameter upto size of 10kb-400kb.. it works fine..
    But my application could genrate very large xml, like 900kb-1000kb even more.. When this large XML is sent as String parameter.. no reply is recieved back..
    Can some body throw some light.. what is going wrong... and which approch to be followed.
    Thanks a lot
    @mit

    Maybe this example on the XDB forum will be helpful...
    XMLType view of Relational Content
    XML type questions are best asked in that forum.
    ;)

  • Read very very large excel file into 2d array (strings or varient)

    Hi all,
    Long time user, first time poster on these boards.
    Looking at the copius amounts of great info related to reading Excel data from .xls files into labview, i've found that every one i've found from various people use the ActiveX method (WorkSheet.Range) which two strings are passed, namely excel's LetterNumber format to specify start and end.
    However, this function does not work when trying to query huge amounts of information. The error returned is "Type Mismatch, -2147352571" I have a very large excel sheet i need to read data from and then close the excel file (original file remains unchanged). However this file is gigantic (don't ask me, I didn't make it and I can't convince them to use something more appropriate) with over 165 columns at 1000 rows of data.I can read a large number of columns, but only a handful of rows, or vice versa.
    Aside from creating a loop to open and close the excel file over and
    over reading pieces of it at a time, is there a better way to read more
    data using ActiveX? Attached is code uploaded by others (with very minor modification) as an example.
    Thanks,
    Attachments:
    Excel Get Data Specified Field (1-46col).vi ‏23 KB

    Hi Maddox731,
    I've only had a very quick glance through your thread, and I must admit I haven't really thought it through properly yet. Sounds like you've come up with your own solution anyway. That said I thought I'd take a bit of a scatter gun approach and attach some stuff for you regradless. Please forgive my bluntness.
    You'll find my ActiveX Excel worksheet reader, which may or may not contain the problem you've come across. I've never tried it with the data size you are dealing with, so no promises. I've also attached my ADO/SQL approach to the problem. This was something I moved onto when I realised the limitations of AX. One thing I have noticed is that ADO/SQL is much faster than AX, so there may be some gains for you there with large data sets if you can implement it.
    I should add that I'm a novice to all this and my efforts are down to bits I've gleamed from MSDN and others' LV examples. I hope it's of some use, if only to spark discussion. Your ctiticism is more than welcome, good or bad.
    Regards.
    Attachments:
    Database Table Reading Stuff.zip ‏119 KB

  • How To Get rid of Exponential format in datagridview when the number is very large

    When the number is very large like :290754232, I got 2.907542E +08. in datagridview cell
    I using vb.net , framework 2.0.
    how can I get rid of this format?
    Thanks in advance

    should I change the type of this column to integer or long ?
    The datagridview is binded to binding source and a list ( Of).
    Mike,
    I'll show you an example that shows the correct way to do this and a another way if you're stuck using strings in exponential format. The latter being the "hack way" I spoke about Friday. I don't like it, it's dangerous, but I'll show both anyway.
    In this example, I'm using Int64 because I don't know the range of yours. If your never exceeds Int32 then use that one instead.
    First, I have a DataGridView with three columns. I've populated the data just by creating longs starting with the maximum value in reverse order for 100 rows:
    The way that I created the data is itself not a great way (there's no encapsulation), but for this example "it'll do".
    Notice though that the third column (right-most column) isn't formatted at all. I commented out the part that does that so that I could then explain what I'm doing. If it works, it should look like the first column.
    The first column represents an actual Int64 and when I show the code, you can see how I'm formatting that using the DGV's DefaultCellStyle.Format property. That's how it SHOULD be done.
    The third column though is just a string and because that string contains a letter in it, Long.TryParse will NOT work. This is where the "hack" part comes in - and it's dangerous, but if you have no other option then ...
    You can see that now the third column matches the first column. Now the code:
    Option Strict On
    Option Explicit On
    Option Infer Off
    Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) _
    Handles MyBase.Load
    With DataGridView1
    .AllowUserToAddRows = False
    .AllowUserToDeleteRows = False
    .AllowUserToOrderColumns = False
    .AllowUserToResizeRows = False
    .AlternatingRowsDefaultCellStyle.BackColor = Color.Aquamarine
    .ReadOnly = True
    .SelectionMode = DataGridViewSelectionMode.FullRowSelect
    .MultiSelect = False
    .RowHeadersVisible = False
    .RowTemplate.Height = 30
    .EnableHeadersVisualStyles = False
    With .ColumnHeadersDefaultCellStyle
    .Font = New Font("Tahoma", 9, FontStyle.Bold)
    .BackColor = Color.LightGreen
    .WrapMode = DataGridViewTriState.True
    .Alignment = DataGridViewContentAlignment.MiddleCenter
    End With
    .ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing
    .ColumnHeadersHeight = 50
    .DataSource = Nothing
    .Enabled = False
    End With
    CreateData()
    End Sub
    Private Sub CreateData()
    Dim longList As New List(Of Long)
    For l As Long = Long.MaxValue To 0 Step -1
    longList.Add(l)
    If longList.Count = 100 Then
    Exit For
    End If
    Next
    Dim stringList As New List(Of String)
    For Each l As Long In longList
    stringList.Add(l.ToString("e18"))
    Next
    Dim dt As New DataTable
    Dim column As New DataColumn
    With column
    .DataType = System.Type.GetType("System.Int64")
    .ColumnName = "Actual Long Value (Shown Formated)"
    dt.Columns.Add(column)
    End With
    column = New DataColumn
    With column
    .DataType = System.Type.GetType("System.String")
    .ColumnName = "String Equivalent"
    dt.Columns.Add(column)
    End With
    column = New DataColumn
    With column
    .DataType = System.Type.GetType("System.String")
    .ColumnName = "Formated String Equivalent"
    dt.Columns.Add(column)
    End With
    Dim row As DataRow
    For i As Integer = 0 To longList.Count - 1
    row = dt.NewRow
    row("Actual Long Value (Shown Formated)") = longList(i)
    row("String Equivalent") = stringList(i)
    row("Formated String Equivalent") = stringList(i)
    dt.Rows.Add(row)
    Next
    Dim bs As New BindingSource
    bs.DataSource = dt
    BindingNavigator1.BindingSource = bs
    DataGridView1.DataSource = bs
    With DataGridView1
    With .Columns(0)
    .DefaultCellStyle.Format = "n0"
    .Width = 150
    End With
    .Columns(1).Width = 170
    .Columns(2).AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
    .Enabled = True
    End With
    End Sub
    ' The following is what I commented
    ' out for the first screenshot. ONLY
    ' do this if there is absolutely no
    ' other way though - the following
    ' casting operation is NOT ADVISABLE!
    Private Sub DataGridView1_CellFormatting(ByVal sender As Object, _
    ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) _
    Handles DataGridView1.CellFormatting
    If e.ColumnIndex = 2 AndAlso e.Value.ToString IsNot Nothing Then
    ' NOTE! The following is dangerous!
    ' I'm going to use coercion to force the
    ' string into a type long. TryParse will
    ' NOT work here. This can easily throw an
    ' exception if the string cannot be cast
    ' to a type long. I'm "depending on" the
    ' the string to cast. At the very least
    ' you might put this in a Try/Catch but
    ' that won't stop it from failing (if
    ' it doesn't work).
    Dim actualValue As Long = CType(e.Value.ToString, Long)
    Dim formattedValue As String = actualValue.ToString("n0")
    e.Value = formattedValue
    End If
    End Sub
    End Class
    Like I said, only use that hack way if there's no other option!
    I hope it helps. :)
    Still lost in code, just at a little higher level.

  • The most efficient way to search a large String

    Hi All,
    2 Quick Questions
    QUESTION 1:
    I have about 50 String keywords -- I would like to use to search a big String object (between 300-3000 characters)
    Is the most efficient way to search it for my keywords like this ?
    if(myBigString.indexOf("string1")!=1 || myBigString.indexOf("string2")!=1 || myBigString.indexOf("string1")!=1 and so on for 50 strings.)
    System.out.println("it was found");
    QUESTION 2:
    Can someone help me out with a regular expression search of phone number in the format NNN-NNN-NNNN
    I would like it to return all instances of that pattern found on the page .
    I have done regular expressions, in javascript in vbscript but I have never done regular expressions in java.
    Thanks

    Answer 2:
    If you have the option of using Java 1.4, have a look at the new regular expressions library... whose package name I forget :-/ There have been articles published on it, both at JavaWorld and IBM's developerWorks.
    If you can't use Java 1.4, have a look at the jakarta regular expression projects, of which I think there are two (ORO and Perl-like, off the top of my head)
    http://jakarta.apache.org/
    Answer 1:
    If you have n search terms, and are searching through a string of length l (the haystack, as in looking for a needle in a haystack), then searching for each term in turn will take time O(n*l). In particular, it will take longer the more terms you add (in a linear fashion, assuming the haystack stays the same length)
    If this is sufficient, then do it! The simplest solution is (almost) always the easiest to maintain.
    An alternative is to create a finite state machine that defines the search terms (Or multiple parallel finite state machines would probably be easier). You can then loop over the haystack string a single time to find every search term at once. Such an algorithm will take O(n*k) time to construct the finite state information (given an average search term length of k), and then O(l) for the search. For a large number of search terms, or a very large search string, this method will be faster than the naive method.
    One example of a state-search for strings is the Boyer-Moore algorithm.
    http://www-igm.univ-mlv.fr/~lecroq/string/tunedbm.html
    Regards, and have fun,
    -Troy

  • Newbie Question:  Mac Maintenance

    Recommendations on Mac maintenance rituals?
    On my XP I have Virus Checker/Malware Checker/DiskCleaner freeware/Win Registery cleaner freeware/ disk defragment schedule / tempfiles cleaner freeware ...etc.
    What are the steps I should take to make sure my mac is performing at optimal levels? I've been with her for about a month and I have seen the "swirlyColorWheel" more times than I think I should.....
    Thanks for all your help
    -Wannabe Mac Geek Tried to be Windows Geek but every upgrade reduced me to newbie status

    You should have posted this in your own topic because this topic has been marked as Solved.
    To answer your question I can make a few suggestions:
    1. Put in a larger hard drive if you are running out of disk space.
    2. Add more RAM to at least 4 GBs if possible.
    3. Kappy's Personal Suggestions for OS X Maintenance
    For disk repairs use Disk Utility. For situations DU cannot handle the best third-party utilities are: Disk Warrior; DW only fixes problems with the disk directory, but most disk problems are caused by directory corruption; Disk Warrior 4.x is now Intel Mac compatible. TechTool Pro provides additional repair options including file repair and recovery, system diagnostics, and disk defragmentation. TechTool Pro 4.5.1 or higher are Intel Mac compatible; Drive Genius is similar to TechTool Pro in terms of the various repair services provided. Versions 1.5.1 or later are Intel Mac compatible.
    OS X performs certain maintenance functions that are scheduled to occur on a daily, weekly, or monthly period. The maintenance scripts run in the early AM only if the computer is turned on 24/7 (no sleep.) If this isn't the case, then an excellent solution is to download and install a shareware utility such as Macaroni, JAW PseudoAnacron, or Anacron that will automate the maintenance activity regardless of whether the computer is turned off or asleep. Dependence upon third-party utilities to run the periodic maintenance scripts had been significantly reduced in Tiger and Leopard. These utilities have limited or no functionality with Snow Leopard and should not be installed.
    OS X automatically defrags files less than 20 MBs in size, so unless you have a disk full of very large files there's little need for defragmenting the hard drive. As for virus protection there are few if any such animals affecting OS X. You can protect the computer easily using the freeware Open Source virus protection software ClamXAV. Personally I would avoid most commercial anti-virus software because of their potential for causing problems.
    I would also recommend downloading the shareware utility TinkerTool System that you can use for periodic maintenance such as removing old logfiles and archives, clearing caches, etc. Other utilities are also available such as Onyx, Leopard Cache Cleaner, CockTail, and Xupport, for example.
    For emergency repairs install the freeware utility Applejack. If you cannot start up in OS X, you may be able to start in single-user mode from which you can run Applejack to do a whole set of repair and maintenance routines from the commandline. Note that AppleJack 1.5 is required for Leopard. AppleJack 1.6 is compatible with Snow Leopard.
    When you install any new system software or updates be sure to repair the hard drive and permissions beforehand. I also recommend booting into safe mode before doing system software updates.
    Get an external Firewire drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
    Backuplist
    Carbon Copy Cloner
    Data Backup
    Deja Vu
    iBackup
    JaBack
    Silver Keeper
    MimMac
    Retrospect
    Super Flexible File Synchronizer
    ynchronizer
    SuperDuper!
    Synchronize Pro! X
    SyncTwoFolders
    Synk Pro
    Synk Standard
    Tri-Backup
    Visit The XLab FAQs and read the FAQs on maintenance, optimization, virus protection, and backup and restore.
    Additional suggestions will be found in Mac Maintenance Quick Assist.
    Referenced software can be found at CNet Downloads or MacUpdate.

  • I was recently sent a very large emoji message amd now when i try to acces messages it will not display mesagges and then will bring me back to the home page

    was recently sent a very large emoji message amd now when i try to acces messages it will not display mesagges and then will bring me back to the home page

    Quit the messages app and reset your phone.
    Go to the Home screen and double click the Home button. That will reveal the row of recently used apps at the bottom of the screen. Tap and hold on the app in question until it jiggles and displays a minus sign. Tap the minus sign to actually quit the app. Then tap anywhere on the screen above that bottom row to return the screen to normal. Then restart the app and see if it works normally. Then reset your device. Press and hold the Home and Sleep buttons simultaneously ignoring the red slider should one appear until the Apple logo appears. Let go of the buttons and let the device restart.
    After the phone restarts go into Messages and delete the thread containing the problem message.

  • Slow Performance or XDP File size very large

    There have been a few reports of people having slow performance in their forms (tyically for Dynamic forms) or file sizes of XDP files being very large.
    These are the symptoms of a problem with cut and paste in Designer where a Process Instruction (PI) used to control how Designer displays a specific palette is repeated many many times. If you look in your XDP source and see this line repeated more than once then you have the issue:
    The problem has been resolved by applying a style sheet to the XDP and removing the instruction (until now). A patch has been released that will fix the cut and paste issue as well as repair your templates when you open them in a designer with the patch applied.
    Here is a blog entry that describes the patch as well as where to get it.
    http://blogs.adobe.com/livecycle/2009/03/post.html

    My XDP file grow up to 145mb before i decided to see what was actually happening.
    It appears that the LvieCycle Designer ES program sometimes writes alot of redundant data... the same line millions of times over & over again.
    I wrote this small java program which reduced the size up to 111KB !!!!!!!!!!!!!!!!!! (wow what a bug that must have been!!!)
    Here's the sourcecode:
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    public class MakeSmaller {
    private static final String DELETE_STRING = "                           <?templateDesigner StyleID aped3?>";
    public static void main(String... args) {
      BufferedReader br = null;
      BufferedWriter bw = null;
      try {
       br = new BufferedReader(new FileReader(args[0]));
       bw = new BufferedWriter(new BufferedWriter(new FileWriter(args[0] + ".small")));
       String line = null;
       boolean firstOccurence = true;
       while((line = br.readLine()) != null) {
        if (line.equals(DELETE_STRING)) {
         if (firstOccurence) {
          bw.write(line + "\n");
          firstOccurence = false;
        } else {
         bw.write(line + "\n");
         firstOccurence = true;
      } catch (FileNotFoundException e) {
       e.printStackTrace();
      } catch (IOException e) {
       e.printStackTrace();
      } finally {
       if (br != null) {
        try {
         br.close();
        } catch (IOException e) {
         e.printStackTrace();
       if (bw != null) {
        try {
         bw.close();
        } catch (IOException e) {
         e.printStackTrace();
    File that gets generated is the same as the xdp file (same location) but gets the extension .small. Just in case something goes wrong the original file is NOT modified as you can see in the source code. And yes Designer REALLY wrote that line like a gazillion times in the .xdp file (shame on the programmers!!)
    You can also see that i also write the first occurrence to the small file just in case its needed...

Maybe you are looking for

  • Help needed with variable - trying to get data from Oracle using linked svr

    Sorry if I posted this in the wrong forum - I just didn't know where to post it. I'm trying to write a simple stored procedure to get data from an oracle database via a linked server in SQL Enterprise manager. I have no idea how to pass a variable to

  • Toolbar doesn't work in Browser

    Hi, I have a student on a Windows 7 operating system, with the latest version of Adobe Reader X. When she tries to view a pdf in the browser (latest Firefox or Internet Explorer) with form fields, the majority of icons on the toolbar do not work. Cli

  • Just wondering ... wich mac is better??

    Which mac is better?? The Mac Book Pro or Mac Book Air. I already have the Pro, but I want to buy a new one. Which one should I buy?

  • Webcam capture works fine in JMFStudio, not in Eclipse

    Hi all, I search the forum, but can't find any answer ! I'm trying to capture a webcam using JMF Performance Pack on XP64. I can read the webcam in JMFStudio, but when using some code to do it, for instance in eclipse, it says : java.io.IOException:

  • Looking for a great case

    Hey, I am looking for a great case that will fit my 15in MBP, one that will not only protect it if it falls, but functions like a brief case, I want a place to put pens and documents, this does not mean it has to look like a breifcase. I just want a