Large string over network

Hi there.
I have a Client/Server connection using TCP/IP.
what i need to do is send a lot of data in the form of a string (it doesn't matter how i send it because at the bottom line i'll need it in the Client side in the form of a string so i can manipulate and use it -that is not the problem)
the problem - how do i save the huge string on the client side? saving it to a file is a bit slow when i need to run all over the content, and saving it on memory is definetly not a good idea.
the size of the data might get to MBs.
i tried sending the data in parts: sending a bit -> analyze it on client ->send more ->analyze it on client. and so on.......
but this was too slow because each time i had to "open a new connection" between the sides.
any ideas?
thank's
Message was edited by:
tom34

i tried sending the data in parts: sending a bit ->
analyze it on client ->send more ->analyze it on
client. and so on.......
but this was too slow because each time i had to
"open a new connection" between the sides.I hope you mean a bit like a small amount and not like 0 or 1 ; )
And then why would you need to open a new connection each time? Have the server send a chunk of the data and then wait for a reply from the client before sending the next chunk. Just make sure those chunks aren't too small (>> 1 packet) or you'll lose pipe-lining...

Similar Messages

  • Urgent help:send image over network using rmi

    hi all,
    i have few question about send image using rmi.
    1) should i use ByteArrayOutputStream to convert image into byte array before i send over network or just use fileinputstream to convert image into byte array like what i have done as below?
    public class RemoteServerImpl  extends UnicastRemoteObject implements RemoteServer
      public RemoteServerImpl() throws RemoteException
      public byte[] getimage() throws RemoteException
        try{
           // capture the whole screen
           BufferedImage screencapture = new Robot().createScreenCapture(new     Rectangle(Toolkit.getDefaultToolkit().getScreenSize()) );
           // Save as JPEG
           File file = new File("screencapture.jpg");
           ImageIO.write(screencapture, "jpg", file);
            byte[] fileByteContent = null;
           fileByteContent = getImageStream("screencapture.jpg");
           return fileByteContent;
        catch(IOException ex)
      public byte[] getImageStream(String fname) // local method
        String fileName = fname;
        FileInputStream fileInputStream = null;
        byte[] fileByteContent = null;
          try
            int count = 0;
            fileInputStream = new FileInputStream(fileName);  // Obtains input bytes from a file.
            fileByteContent = new byte[fileInputStream.available()]; // Assign size to byte array.
            while (fileInputStream.available()>0)   // Correcting file content bytes, and put them into the byte array.
               fileByteContent[count]=(byte)fileInputStream.read();
               count++;
           catch (IOException fnfe)
         return fileByteContent;           
    }2)if what i done is wrong,can somebody give me guide?else if correct ,then how can i rebuild the image from the byte array and put it in a JLable?i now must use FileOuputStream but how?can anyone answer me or simple code?
    thanks in advance..

    Hi! well a had the same problem sending an image trough RMI.. To solve this i just read the image file into a byte Array and send the array to the client, and then the client creates an imegeIcon from the byte Array containing the image.. Below is the example function ton read the file to a byte Array (on the server) and the function to convert it to a an imageIcon (on the client).
    //      Returns the contents of the file in a byte array.
        public static byte[] getBytesFromFile(File file) throws IOException {
            InputStream is = new FileInputStream(file);
            // Get the size of the file
            long length = file.length();
            // You cannot create an array using a long type.
            // It needs to be an int type.
            // Before converting to an int type, check
            // to ensure that file is not larger than Integer.MAX_VALUE.
            if (length > Integer.MAX_VALUE) {
                // File is too large
            // Create the byte array to hold the data
            byte[] bytes = new byte[(int)length];
            // Read in the bytes
            int offset = 0;
            int numRead = 0;
            while (offset < bytes.length
                   && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {
                offset += numRead;
            // Ensure all the bytes have been read in
            if (offset < bytes.length) {
                throw new IOException("Could not completely read file "+file.getName());
            // Close the input stream and return bytes
            is.close();
            return bytes;
        }to use this function simply use something like this
    public byte[] getImage(){
    byte[] imageData;
              File file = new File("pic.jpg");
              // Change pic.jpg for the name of your file (duh)
              try{
                   imageData = getBytesFromFile(file);
                   // Send to client via RMI
                            return imageData;
              }catch(IOException ioe){
                           // Handle exception
                           return null; // or whatever you want..
    }and then on the client you could call a function like this
    public ImageIcon getImageFromServer(){
         try{
              // get the image from the RMI server
              byte[] imgBytes = myServerObject.getImage();
              // Create an imageIcon from the Array of bytes
              ImageIcon ii = new ImageIcon(imgBytes);
              return ii;
         }catch(Exception e){
              // Handle some error..
              // If yo get here probably something went wrong with the server
              // like File Not Found or something like that..
              e.printStackTrace();
              return null;
    }Hope it helps you..

  • Help! Saving an image to stream and recreating it on client over network

    Hi,
    I have an application that uses JDK 1.1.8. I am trying to capture the UI screens of this application over network to a client (another Java app running on a PC). The client uses JDK 1.3.0. As AWT image is not serializable, I got code that converts UI screens to int[] and persist to client socket as objectoutputstream.writeObject and read the data on client side using ObjectInputStream.readObject() api. Then I am converting the int[] to an Image. Then saving the image as JPEG file using JPEG encoder codec of JDK 1.3.0.
    I found the image in black and white even though the UI screens are in color. I have the code below. I am sure JPEG encoder part is not doing that. I am missing something when recreating an image. Could be colormodel or the way I create an image on the client side. I am testing this code on a Win XP box with both server and client running on the same machine. In real scenario, the UI runs on an embedded system with pSOS with pretty limited flash space. I am giving below my code.
    I appreciate any help or pointers.
    Thanks
    Puri
         public static String getImageDataHeader(Image img, String sImageName)
             final String HEADER = "{0} {1}x{2} {3}";
             String params[] = {sImageName,
                                String.valueOf(img.getWidth(null)),
                                String.valueOf(img.getHeight(null)),
                                System.getProperty("os.name")
             return MessageFormat.format(HEADER, params);
         public static int[] convertImageToIntArray(Image img)
             if (img == null)
                 return null;
            int imgResult[] = null;
            try
                int nImgWidth = img.getWidth(null);
                int nImgHeight = img.getHeight(null);
                if (nImgWidth < 0 || nImgHeight < 0)
                    Trace.traceError("Image is not ready");
                    return null;
                Trace.traceInfo("Image size: " + nImgWidth + "x" + nImgHeight);
                imgResult = new int[nImgWidth*nImgHeight];
                PixelGrabber grabber = new PixelGrabber(img, 0, 0, nImgWidth, nImgHeight, imgResult, 0, nImgWidth);
                grabber.grabPixels();
                ColorModel model = grabber.getColorModel();
                if (null != model)
                    Trace.traceInfo("Color model is " + model);
                    int nRMask, nGMask, nBMask, nAMask;
                    nRMask = model.getRed(0xFFFFFFFF);
                    nGMask = model.getRed(0xFFFFFFFF);
                    nBMask = model.getRed(0xFFFFFFFF);
                    nAMask = model.getRed(0xFFFFFFFF);
                    Trace.traceInfo("The Red mask: " + Integer.toHexString(nRMask) + ", Green mask: " +
                                    Integer.toHexString(nGMask) + ", Blue mask: " +
                                    Integer.toHexString(nBMask) + ", Alpha mask: " +
                                    Integer.toHexString(nAMask));
                if ((grabber.getStatus() & ImageObserver.ABORT) != 0)
                    Trace.traceError("Unable to grab pixels from the image");
                    imgResult = null;
            catch(Throwable error)
                error.printStackTrace();
            return imgResult;
         public static Image convertIntArrayToImage(Component comp, int imgData[], int nWidth, int nHeight)
             if (imgData == null || imgData.length <= 0 || nWidth <= 0 || nHeight <= 0)
                 return null;
            //ColorModel cm = new DirectColorModel(32, 0xFF0000, 0xFF00, 0xFF, 0xFF000000);
            ColorModel cm = ColorModel.getRGBdefault();
            MemoryImageSource imgSource = new MemoryImageSource(nWidth, nHeight, cm, imgData, 0, nWidth);
            //MemoryImageSource imgSource = new MemoryImageSource(nWidth, nHeight, imgData, 0, nWidth);
            Image imgDummy = Toolkit.getDefaultToolkit().createImage(imgSource);
            Image imgResult = comp.createImage(nWidth, nHeight);
            Graphics gc = imgResult.getGraphics();
            if (null != gc)
                gc.drawImage(imgDummy, 0, 0, nWidth, nHeight, null);       
                gc.dispose();
                gc = null;       
             return imgResult;
         public static boolean saveImageToStream(OutputStream out, Image img, String sImageName)
             boolean bResult = true;
             try
                 ObjectOutputStream objOut = new ObjectOutputStream(out);
                int imageData[] = convertImageToIntArray(img);
                if (null != imageData)
                    // Now that our image is ready, write it to server
                    String sHeader = getImageDataHeader(img, sImageName);
                    objOut.writeObject(sHeader);
                    objOut.writeObject(imageData);
                    imageData = null;
                 else
                     bResult = false;
                objOut.flush();                
             catch(IOException error)
                 error.printStackTrace();
                 bResult = false;
             return bResult;
         public static Image readImageFromStream(InputStream in, Component comp, StringBuffer sbImageName)
             Image imgResult = null;
             try
                 ObjectInputStream objIn = new ObjectInputStream(in);
                 Object objData;
                 objData = objIn.readObject();
                 String sImageName, sSource;
                 int nWidth, nHeight;
                 if (objData instanceof String)
                     String sData = (String) objData;
                     int nIndex = sData.indexOf(' ');
                     sImageName = sData.substring(0, nIndex);
                     sData = sData.substring(nIndex+1);
                     nIndex = sData.indexOf('x');
                     nWidth = Math.atoi(sData.substring(0, nIndex));
                     sData = sData.substring(nIndex+1);
                     nIndex = sData.indexOf(' ');
                     nHeight = Math.atoi(sData.substring(0, nIndex));
                     sSource = sData.substring(nIndex+1);
                     Trace.traceInfo("Name: " + sImageName + ", Width: " + nWidth + ", Height: " + nHeight + ", Source: " + sSource);
                     objData = objIn.readObject();
                     if (objData instanceof int[])
                         int imgData[] = (int[]) objData;
                         imgResult = convertIntArrayToImage(comp, imgData, nWidth, nHeight);
                         sbImageName.setLength(0);
                         sbImageName.append(sImageName);
            catch(Exception error)
                error.printStackTrace();
             return imgResult;
         }   

    While testing more, I found that the client side is generating color UI screens if I use JDK 1.3 JVM for running the server (i.e the side that generates the img) without changing single line of code. But if I use JDK 1.1.8 JVM for the server, the client side is generating black and white versions (aka gray toned) of UI screens. So I added code to save int array that I got from PixelGrabber to a text file with 8 ints for each line in hex format. Generated these files on server side with JVM 1.1.8 and JVM 1.3. What I found is that the 1.1.8 pixel grabber is setting R,G,B components to same value where as 1.3 version is setting them to different values thus resulting in colored UI screens. I don't know why.

  • L3 topology diagram with a large number of networks

                       I am working on redesigning a network that is using a single class B network for there LAN workstations and servers. I proposed for them to separate the two and put all of their servers into one class C network and the workstation in another class C. They stated that they wanted 14 separate networks for the workstations, different for section of the building, and 28 for the servers. The reason for the 28 is due to the fact they didn't keep track of how they used their address space and they do not want to renumber servers due to firewall rules. I have 50 networks hanging off of the collapsed core switch "WS-C6513-E" and finding room for all of these network is quite difficult. Does anyone have any experience with creating network topology diagrams with a large amount of networks hanging off of one device? I have attached a doc of what I have done.

    Brandon
    Sorry, you did say that in the last bit of your first post.
    Last time i was doing topology diagrams i believe Visio had a pop up function where you could click over it but obviously if you are printing them out that does no good.
    Unless you can summarise them to one entry with a note of how many subnets are being used within the summary i can't think of a way to do it. You could match the vlan number to the subnet (which you have partly done) and then just list the vlan numbers with the network prefix and make a note the subnet is derived from the vlan number.
    Jon

  • Best way to share aperture library over network on two computers?

    I've read several posts about doing this and most recommend using an external HD and just hot swapping. However, is their not a better alternative? Can I not share my library over the network, or just remote connect to the other computer?
    Thanks for the help!

    Hi Terence and Leonie,
    You can run several Aperture on the same computer as long as all Aperture are using distinct libraries.
    What Aperture does is to create a simple lock file in <your Aperture library>.aplibrary/Database/apdb The lock file contains the PID of the process. So not two Aperture could open the same library (although I don't know how good they have manage the concurrent creation, locking, verification of this lock, this is a typical and difficult software engineering problem)
    Anyway, I have not said that Aperture supports concurrent editing. That a file is a database or a simple text file, you have basically the same issues on network or in concurrent environment. So if the folder structure holds simple, flat text file or xml object or databases, it is still a bunch of files (this is a UNIX system by the way ).
    Aperture contains more than one SQLlite file, there are some at the root folder, some under Database/apdb etc. there are also XML files that could be used as database.
    Anyhow, editing a file (SQLlite, XML, txt, doc, etc.) either on a share or locally is plain similar. The drive can fail too, although much less likely than the network.
    Network file edition can have a few shortcomings, but nothing that when known can be blocking.
    Locking files over the network can however be tricky and depends largely on the network protocol used (NFS, SMB/CIFS or AFP just to name a few). In addition, if you import files from /Users/foo/Photos in Aperture (without copying them within Aperture), they might not be visible from another computer or only the previews, as the path /Users/foo/Photos is not "visible" from the other computer.
    What really is a problem when you put a file not locally is the file system type and its features. HFS+ supports extended attributes (metadata), many other file systems support these but the API (how the software, such as Aperture, access this feature) might not be similar, in addition the amount of metadata or their structure might differ from file system to another. And this is where you might lose information.
    A tool like Dropbox is pretty good at maintaining the metadata across different computers, and it has been adapted to do so for OS X specifically (and also for Linux and Windows).
    The second problem is if you would have a Mac and share via SMB (the Windows share network protocol, aka CIFS on recent Windows versions) the library, SMB might not support the reading and writing of HFS+ metadata, thus data loss might occur.
    Apple is just warning us of all these shortcomings, and advise to use local storage formatted as HFS+. Because even a local external disk formatted as NTFS or other file system could be a problem.
    However, power users who understand the risks and limitations of a network share (in general) can create a disk image on a share (even if it is SMB). As for OS X, once the disk image is mounted, it is just like any other local hard disk, it is just "slower" especially latency wise. OS X supports perfectly disk image mounted on a share, it takes care of properly synchronising it.
    Of course, due to the nature of the link between the application data and where they are stored, in case of application or OS crash, the amount of data loss could be greater than when the data are held locally.
    I hope this clarify better my post.
    Note: another shortcoming of having it on the network is: Aperture lock the library by creating a file with a process ID. If the same library is opened from another computer on the network, this other Aperture instance might see the lock file and could perhaps not find the corresponding running process. This Aperture instance might then decide to ignore the lock and proceed with opening the library. This might have some consequences.
    But I haven't developed Aperture so I don't know how it would behave

  • How check data transmission over network?

    Suspect large chunks of data are being sent from iPhone over network late at night (saw it when iPhone was off-net).
    How can I check network activity?

    Internet access basically. Any time you open a browser, Facebook, check your email, send an iMessage,  anything that requires the internet uses data over a cell network when Wifi is not available, unless specified otherwise in Settings->Cellular->Use Cellular Data For.
    GPS is not used with cellular data.  however Apps may need to download Maps to show you the GPS data being received.
    Text Messages are not cellular data. That is a separate service from the carrier.
    Searching for Wifi does not use cellular data. Wifi searching is local, it only looks for routers near you, using the wifi antenna, nothing to look for over cellular.

  • Running a java program over network

    Hi,
    How a java program on a machine can be run without having JRE on the same machine, rather interpreting bytecode over network having JRE on another machine?

    Rahul.Kumar wrote:
    well, so my java program is running on x. Initialy X had JRE and on invoking java program from command prompt, it had looked for JRE at path, set in environmental settings. Now I moved JRE to another machine Y and connected these two machines (X and Y). You have two machines X and Y.
    "Connected" or not has nothing to do with this discussion.
    In X path is set to the JRE on Y. The path on X has absolutely nothing to do with anything on Y.
    Now execute java program on X, theoretically it should work or what is wrong with this?This makes no sense. Presuming you meant Y in the above then the following must be true.
    1. You must have a JRE on Y.
    2. You must have a java application on Y (or one accessible via the file system on Y.)
    3. You must be on Y and start the JRE passing the java application that is on Y to it.
    Notice in the above there is no mention of X. There can be no mention of X.

  • Need help on breaking a large string into substringsto fit in a line

    hii,suppose i have i have large string (the content of which is not apparently visible to me)which i want to show in a text area ,,,now how can i break it into multiple lines to be able view the total string...
    i dont want to use horizantal scrollbar...
    here i submit a sample code..and pls show me the neccesary modifications...
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class textarea extends JFrame
    textarea()
    super("Text area length test");
    setSize(640,480);
    Container contentpane=getContentPane();
    JTextArea area=new JTextArea("Split panes allow the user to dynamically change the size of two or more components displayed side-by-side (within a window or another panel). Special dividers can be dragged with the mouse to increase space for one component and decrease the display space for another. Note that the total display area does not change. This gives applications a more modern and sophisticated view. A familiar example is the combination of a tree and a table separated by a horizontal divider (e.g. file explorer-like applications). The Swing framework for split panes consists only of JSplitPane.");
    area.setLayout(new BorderLayout());
    contentpane.add(area);
    setVisible(true);
    class texttest
    public static void main(String args[])
    new textarea();
    In the original code the Stron to be printed is not visible to me...

    Configure the text area so that it uses word wrap (see the javadoc)
    Kaj

  • Accessing shared files over network

    I am having some problems with a couple of database files that I access with a Java program over network. Different computers running this program all need access to these files, and my question is if anyone know of a good way to make sure that only one user have access to these files at the time. There is no server software running were the files are stored, they are simply reached through file sharing. Currently I am creating a lock file indicating that someone is editing the files, however if I am unlucky 2 users create that lockfile at the same time and then both get access to the file corrupting it. Anyone experienced this and know of a nice solution to avoid it?

    I am having some problems with a couple of database
    files that I access with a Java program over network.
    Different computers running this program all need
    access to these files, and my question is if anyone
    know of a good way to make sure that only one user
    have access to these files at the time.Use a database server instead.

  • Share Aperture photos over network

    Hallo every body,
    iam searching for a solution, how to share photo over network for a long time, in our company we have 40 macs(imac, mac bookpro) and 3 xserve, vtrak and 30pc. and we have round about 30000 pic they are saved in iphoto library on one of the xserve.
    My Boss wants from me to find a solution to share these photos over network. the mac users must use iphoto to access these photos.
    which program shall i install on the server so that the client users can access the photos from there macs through iphoto.
    at the beginning i used the share library option in iphoto, until iphoto 9.1.1. By iphoto 9.1.1 on the client when i click on the shared library my searching field disappears and i cant search in the shared photos.
    I thought Aperture is the solution, so i shared the aperture library over the network (with afp protocoll) but in order to access the network aperture library, first i need to install aperture on the client and then i open iphoto and from iphoto option i can choose the option access aperture library.
    how can i solve it without to install aperture on the client, is there any iphoto plugin so that i can access aperture library without installing aperture
    or is there somebody uses another solution???
    please help
    best regards
    Tony

    Neither iPhoto nor Aperture is the solution for this.
    The idea of using iphoto on the client machines is wrong, it's just not designed for that use. Iphoto is designed for a family with a point and shoot camera, or even a phone. Aperture is a pro level photomanager. Installing Aperture on all the mchines means you will have to purchase the app for all the machine, you need a site licence.
    Also, it won't work anyway. You can't share an Aperture Library like an iPhoto one an only one user can access the Library at a time. So, one of the users acesses the Library and all the others are locked out.
    Neither are what you need: you need a media server application. A pro level media server. Tell your boss he's fooling himself if he thinks anything else will work reliably.
    Regards
    TD

  • Large string array in 6.1 is extremely slow

    Good day all,
    While this is in to tech support at NI, I wanted to see if anyone else has encountered it.
    I am upgrading from 6.0.2 to 6.1. Several large (2500 rows by 250 columns or larger) string arrays are used as inputs into subvi's. Under 6.0.2, these functions run in tenths of seconds, while under the converted 6.1 vi's they run in 20 seconds or more!
    Tracing back using probes, the problem is occurring at the point of the input. It is appears that the array is taking many seconds to copy from the input to the wire on the diagram.
    Array controls generated in 6.1 (not converted from 6.0.2) seem to function just fine. Using a save with options... to convert back to 6.0.2, the vi's again function in tenths of
    seconds.
    Anyone have any ideas?
    Thanks!

    I hear what you're saying about legacy code...
    Something you might want to be looking at for the future is migrating to a structure where the data is stored in a 1D array, where each element is a cluster contain the data that's now in a single row. This would be the most straight-forward change, but could make getting at the data tricky, depending on how you need to be able to search it.
    Alternately, you could have a cluster containing arrays of each of the row values.In this structure element 0 of all the arrays is the first "row", element 1 of the arrays is the second "row" and so on. This structure at first blush looks more complicated, but it's really not, plus it would allow you to use any value (or combination of
    values) to search for a specific row without a lot of parsing.
    If the data that is in the example VIs you posted is typical, either of these changes would be advantagous because it looks like there is a lot of reptative data that might be able to be encoded in an enum. Plus storing numbers as numbers often reduces the memory required and produces a predictable memory footprint (an I32 will always take-up 4 bytes per value regardless of how large of small the number is). My sense is that the variability of the string size is what's killing you.
    One thing that would make this sort of dramatic change somewhat easier is that because you are changing the basic datatype of the interface, you aren't going to have to worry about finding all the places the change will effect--the wires will be broken.
    If you ever decide to take this on, give a hollar.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • 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.

  • What is the efficient way to migrate the large DB (over 1TB) from 9i to 11g

    Can any body give a suggestion for migrate the large DB (Over 1TB) from 9i to 11g?

    Hi;
    Can any body give a suggestion for migrate the large DB (Over 1TB) from 9i to 11g?Please check below
    Minimizing Downtime During Production Upgrade [ID 478308.1]
    Master Note For Oracle Database Upgrades and Migrations [ID 1152016.1]
    Different Upgrade Methods For Upgrading Your Database [ID 419550.1]
    I suggest also Please check my blog
    http://heliosguneserol.wordpress.com/2010/06/17/move-to-oracle-database-11g-release-2-wiht-mike-dietrich/
    In this pdf you can see patch of to upgrade db from x to n wiht many senerios wiht all related metalinks notes which is created by Oracle worker Mike Dietrich
    Regard
    Helios

  • 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....

  • 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);

Maybe you are looking for

  • Executing if condition in a sql prompt with in a shell script

    Hi all, i need to write a shell script where i need to execute a sql statement. if the count from the above sql is greater than certain value i need to execute a another sql statement.After some time i need to check the count again using above sql an

  • Replacing a root pool disk example

    Replacing a root pool disk has several use cases: 1. Replace a small disk with a larger disk 2. Replace a failed disk with a replacement disk 3. Outright move a rpool to a different disk because you want to The easiest way is to attach the replacemen

  • Syncing iPod After Restoring iPod to Original Settings

    I am having a problem syncing my iPod with iTunes after restoring my iPod to it's original settings. I have a 20GB iPod with a click wheel that I recently restored to its original settings because the iPod was locking up. To complete the restore, I h

  • Disk Utility and Repair Disk Permissions

    Using Yosemite 10.10.3 , an this is what I see every time I run the Disk Utility.  Then I select 'Repair Disk Permissions' but nothing ever gets fixed. Whats the point of the 'Repair' button if nothing ever gets repaired??  Should I not believe the r

  • 802.1x multipoint authenticator and security issue

    Hi everybody Let say we have following set up: host1 host2   ) ----------------hub------ f1/0-switch( authenticator)-------------------------Radius server. host3 The switch is configured as follows. Switch(config)#interface FastEthernet 1/0 Switch(co