Help in reading writing string type arraya onto socket..???

hi everybody
how i can write and read a string type array on a socket???
plz help
thanks in advance

I see that you have posted this similar Q before [1]. It is already answered. Read and interpret the given answers. Ask new and specific questions if you don't understand the answers and you will be helped. But don't be ignorant and don't doublepost this question in irrelevant forums.
[1] http://forum.java.sun.com/thread.jspa?threadID=5229301

Similar Messages

  • Reading/Writing Multiple Files From/To Socket

    I'm have a problem in recognizing end of file in socket.
    when I write files one after another using object input stream wrapped on the socket's input stream.
    on one side:
    while((n = send_file_input_stream[ i ].read(buff)!=-1)
    socket_output_stream.write(buff,0,n)
    on the other side:
    while((n = socket_input_stream.read(buff)!=-1)
    recv_file_output_stream[ i ].write(buff,0,n)
    this process happens for i=1..N files
    1) how can i signal the socket That EOF occures ?
    2) how can the recieving socket stream recognize it?
    3) Is there a simple mechnism for transffering files in java
    from dir to dir from disk to socket ?
    like copy(InputStream from,OutputStram to)
    Thanks
    Joseph

    one way is to write something as an end of file marker after each file, say character 255, just make sure you escape any 255's in the file (say by sending two 255's)
    The other end then needs to look for the 255's, if it gets one on its own its the end of the file. If it get's two together its a single 255 thats part of the file.
    If that seems a bit complicated you could send a header with the count of bytes before each file, the receiving end then just has to count bytes.
    Another way is to use a new connection for each file (probably also the easiest)

  • Stax reading /writing need help from xml guru plz

    hi, i have been told that stax reading /writing should involve no overhead and that is why i use it and i am now able to write my large data to file, but using my reader i seem to run out of memory, using netbeans profiler i ahve found that char[] seems to be the problem,
    by backtracing i ahve found that javax.xml.parser.SAXParser.parse calls the xerces packages which eventually leads to the char[ ], now my code for my reader is attatched here...
    package utilities;
    import Categorise.Collection;
    import Categorise.Comparison;
    import Categorise.TestCollection;
    import java.io.IOException;
    import javax.xml.parsers.*;
    import org.xml.sax.SAXException;
    import org.xml.sax.helpers.DefaultHandler;
    import org.xml.sax.Attributes;
    import java.io.File;
    import java.util.ArrayList;
    import java.util.List;
    import measures.Protocol;
    * @author dthomas
    public class XMLParser extends DefaultHandler
        static Collection collection = new Collection();
        List<Short> cList;
        List<Comparison> comparisonList;
        File trainFileName;
        File testFileName;
        TestCollection tc;
        List<TestCollection> testCollectionList;
        List<File> testFileNameList = new ArrayList<File>();
        List<File> trainFileNameList = new ArrayList<File>();
        boolean allTrainsAdded = false;
        Protocol protocol;
        List<File> trainingDirList;
        File testingDir;
        int counter = 0;
        File[ ] trainingDirs;
        File[ ] trainingFileNames;
        File[ ] testFileNames;
        TestCollection[ ] testCollections;
        Comparison[ ] comparisons;
        Comparison c;
        short[ ] cCounts;
        String order;
        String value;
        File trainDir;
        /** Creates a new instance of XMLParser */
        public XMLParser() {
        public static Collection read( File aFile )
            long startTime = System.currentTimeMillis();
            System.out.println( "Reading XML..." );
            SAXParserFactory spf = SAXParserFactory.newInstance();
            SAXParser sp;
            try {
                sp = spf.newSAXParser();
                sp.parse( aFile, new XMLParser() );
            } catch (IOException ex) {
                ex.printStackTrace();
            } catch (SAXException ex) {
                ex.printStackTrace();
            } catch (ParserConfigurationException ex) {
                ex.printStackTrace();
            long endTime = System.currentTimeMillis();
            long totalTime = ( endTime - startTime ) / 1000;
            System.out.println( "Done..."  + totalTime + " seconds" );
            return collection;
        public void startElement(String uri,String localName,String qName, Attributes attributes)
            if( qName.equals( "RE" ) )
                testCollectionList = new ArrayList<TestCollection>();
            else if( qName.equals( "p") )
                boolean isConcatenated = new Boolean( attributes.getValue( "c" ) );
                boolean isStatic = new Boolean( attributes.getValue( "s" ) );
                protocol = new Protocol( isConcatenated, isStatic );
            else if( qName.equals( "trdl" ) )
                trainingDirList = new ArrayList<File>();
            else if( qName.equals( "trd" ) )
                trainDir = new File( attributes.getValue( "fn" ) );
                trainingDirList.add( trainDir );
            else if( qName.equals( "td" ) )
                testingDir = new File( attributes.getValue( "fn" ) );
            else if( qName.equals( "TC" ) )
                counter++;
                System.out.println( counter );
                comparisonList = new ArrayList<Comparison>();
                testFileName = new File( attributes.getValue( "tfn" ) );
                testFileNameList.add( testFileName );
                tc = new TestCollection( );
                tc.setTestFileName( testFileName );
            else if ( qName.equals( "r" ) )
             order = attributes.getValue( "o" );
                value = attributes.getValue( "v" );
                cList.add( Short.parseShort( order ), new Short( value ) );
            else if( qName.equals( "c" ) )
                cList = new ArrayList<Short>();
                trainFileName = new File( attributes.getValue( "trfn" ) );
                if( !allTrainsAdded )
                    trainFileNameList.add( trainFileName );
        public void characters(char []ch,int start,int length)
            //String str=new String(ch,start,length);
            //System.out.print(str);
        public void endElement(String uri,String localName,String qName)
            if (qName.equals( "c") )
                allTrainsAdded = true;
                cCounts = new short[ cList.size() ];      
                for( int i = 0; i < cCounts.length; i++ )
                    cCounts[ i ] = cList.get( i );
                c = new Comparison( trainFileName, tc );
                c.setcCounts( cCounts );
                this.comparisonList.add( c );
            else if( qName.equals( "TC" ) )
                comparisons = new Comparison[ comparisonList.size() ];
                comparisonList.toArray( comparisons );           
                tc.setComparisons( comparisons );
                testCollectionList.add( tc );
            else if( qName.equals( "RE" ) )
                testCollections = new TestCollection[ testCollectionList.size() ];
                testCollectionList.toArray( testCollections );
                collection.setTestCollections( testCollections );
                testFileNames = new File[ testFileNameList.size() ];
                testFileNameList.toArray( testFileNames );
                collection.setTestingFiles( testFileNames );
                //String[ ] testCategories = new String[ testCategoryList.size() ];
                //testCategoryList.toArray( testCategories );
                //collection.setTestCategories( testCategories );
                trainingFileNames = new File[ trainFileNameList.size() ];
                trainFileNameList.toArray( trainingFileNames );
                collection.setTrainingFiles( trainingFileNames );
                //String[ ] trainingCategories = new String[ trainCategoryList.size() ];
                //trainCategoryList.toArray( trainingCategories );
                //collection.setTrainingCategories( trainingCategories );
                collection.setProtocol( protocol );
                trainingDirs = new File[ trainingDirList.size() ];
                trainingDirList.toArray( trainingDirs );           
                collection.setTrainingDirs( trainingDirs );
                collection.setTestingDir( testingDir );
         //else
             //System.out.println("End element:   {" + uri + "}" + localName);
    }i thought it may have been a recursive problme, hence having so many instance variables instead of local ones but that hasn't helped.
    all i need at the end of this is a Collection which holds an array of testCollections, which holds an array of cCounts and i was able to hold all of this in memory as all i am loading is what was in memory before it was written.
    can someone plz help
    ps when i use tail in unix to read the end of the xml file it doesnt work correctly as i cannot specify the number of lines to show, it shows all of the file as thought it is not split into lines or contains new line chars or anything, it is stored as one long stream, is this correct??
    here is a snippet of the xml file:
    <TC tfn="
    /homedir/dthomas/Desktop/4News2/output/split3/alt.atheism/53458"><c trfn="/homed
    ir/dthomas/Desktop/4News2/output/split0/alt.atheism/53586"><r o="0" v="0"></r><r
    o="1" v="724"></r><r o="2" v="640"></r><r o="3" v="413"></r><r o="4" v="245"></
    r><r o="5" v="148"></r><r o="6" v="82"></r><r o="7" v="52"></r><r o="8" v="40"><
    /r><r o="9" v="30"></r><r o="10" v="22"></r><r o="11" v="16"></r><r o="12" v="11
    "></r><r o="13" v="8"></r><r o="14" v="5"></r><r o="15" v="2"></r></c><c trfn="/
    homedir/dthomas/Desktop/4News2/output/split0/alt.atheism/53495"><r o="0" v="0"><
    /r><r o="1" v="720"></r><r o="2" v="589"></r><r o="3" v="349"></r><r o="
    please if anyone has any ideas from this code why a char[] would use 50% of the memory taken, and that the average age seems to show that the same one continues to grow..
    thanks in advance
    danny =)

    hi, i am still having lo luck with reading the xml data back into memory, as i have said before, the netbeans profiler is telling me it is a char[] that is using 50% of the memory but i cannot see how a char[] is created, my code doesn't so it must be the xml code...plz help

  • Help on reading from and writing to a file !!!!!!!!!!!!!!!!

    hi there
    anyone can help me on how to write and read from a file? how can i read one string at a time instead of a char. thank you.

    You can do this with classes FileReader and FileWriter directly, but it's easiest to wrap these with other classes and call methods on those to read and write a string. All of the classes used below are in the java.io package. The code fragments just print any I/O exceptions to stderr. Replace filename with the name of the file you want to use.
    To write a string to a file:
    String s = "hello";
    try {
    FileWriter fw = new FileWriter("filename");
    PrintWriter pr = new PrintWriter(fw);
    pr.println(s); // write a string with a newline at the end
    // pr.print(s); // write a string without a newline at the end
    pr.close(); // must close for string to be written
    } catch (IOException e) {
    System.out.println(e);
    To read a string from a file:
    String s;
    try {
    BufferedReader br = new BufferedReader(new FileReader("filename"));
    s = br.readLine();
    } catch (IOException e) {
    System.out.println(e);

  • Help on reading and writing to a file !!!!!!!!!!!!!!!!

    hi there
    anyone can help me on how to write and read from a file? how can i read one string at a time instead of a char. thank you.

    Use the StringTokenizer to break up the line
    File newFile = new File("text.txt");
    BufferedReader in = new BufferedReader(new FileReader (newFile));
    String line;
    while((line = in.readLine()) != null){
    StringTokenizer st = new StringTokenizer(inputLine, " ");
    while(st.hasMoreTokens()){
    // do something with the token
    // e.g:
    // String lc = st.nextToken().toLowerCase()
    hope that helps

  • When i open FF start the google is so small I cant read what i type HELP!

    When i open FF start page the google block is so small I cant read what i type HELP! how do I make this larger?????

    The text editor is the text area that you use on the webmail (Yahoo, Hotmail) website to create a new mail.
    You can compare that with the ''Post new message'' text area that you use to create a new post on this forum.
    Just above the text area that you use to enter the message text there is usually a button bar with buttons that allows some text formatting like Bold and Italic and can also include a button to make a clickable hyperlink.
    Check the tooltip of each button by hovering with the mouse over each button.
    Make Link - https://addons.mozilla.org/firefox/addon/142

  • Reading/Writing .xlsx files using Webdynpro for Java

    Dear All
    I have a requirement to read/write excel files in .xlsx format. I am good in doing it with .xls format using jxl.jar. The jxl.jar doesn't support .xlsx format. Kindly help me in understanding how do I need to proceed on reading/writing .xlsx files using Webdynpro for Java.
    Thanks and Regards
    Ramamoorthy D

    i am using jdk 1.6.22 and IBM WebSphere
    when i use poi-3.6-20091214.jar and poi-ooxml-3.6-20091214.jar  to read .xlsx file. but i am getting following errors
    The project was not built since its classpath is incomplete. Cannot find the class
    file for java.lang.Iterable. Fix the classpath then try rebuilding this project.
    This compilation unit indirectly references the missing type java.lang.Iterable
    (typically some required class file is referencing a type outside the classpath)
    how can i resolve it
    here is the code that i have used
    public class HomeAction extends DispatchAction {
         public ActionForward addpage(
                             ActionMapping mapping,
                             ActionForm form,
                             HttpServletRequest request,
                             HttpServletResponse response)
                             throws Exception {     
                             String name = "C:/Documents and Settings/bharath/Desktop/Book1.xlsx";
               FileInputStream fis = null;
               try {
                   Object workbook = null;
                    fis = new FileInputStream(name);
                    XSSFWorkbook wb = new XSSFWorkbook(fis);
                    XSSFSheet sheet = (XSSFSheet) wb.getSheetAt(0);
                    Iterator rows = sheet.rowIterator();
                    int number=sheet.getLastRowNum();
                    System.out.println(" number of rows"+ number);
                    while (rows.hasNext())
                        XSSFRow row = ((XSSFRow) rows.next());
                        Iterator cells = row.cellIterator();
                        while(cells.hasNext())
                    XSSFCell cell = (XSSFCell) cells.next();
                    String Value=cell.getStringCellValue();
                    System.out.println(Value);
               } catch (IOException e) {
                    e.printStackTrace();
               } finally {
                    if (fis != null) {
                         fis.close();
                return mapping.findForward("returnjsp");

  • HELP - Buffered Reader

    Below is a portion of my program, its a simple app, that is supposed to read a policy number, and then display the results. I can't get it to read the file, or output onto the app. Any help would be appreciated.
    the file is called loans.txt and a line looks like this...
    12322|Smith, Dennis|456 Westfield Blvd|Westfield, IN 46033|$2,500|1/1/2001|7/11/2005|None
    public void GetFile(){
    //User's entered policy number is stored here
    String Policy_Num_Entered = SearchFor.getText();
    /*If the the policy is found in loans.txt, sucess will be changed to 1,
    otherwise it will stay 0 and be used to output a "I'm Sorry message*/
    int sucess = 0;
    //Try Catch Block
    try{
    BufferedReader br = new BufferedReader(new FileReader(file));
    //Access the first line of loans.txt
    String line = br.readLine();
    //Read the # of lines in loans.txt
    LineNumberReader read = new LineNumberReader(new FileReader(file));
    //Assign the # of lines to count
    int count = read.getLineNumber();
    //Item being looked by the String Tokenizer
    String Item;
    //For loop, looping the # of times a line must be read
    for(int x = 0; x < count; x++){
    //While Line is not empty, proceed
    while ( line != null )
    //Read individual words of the line from loans.txt
    StringTokenizer tokenizer = new StringTokenizer(line, "|");
    Item = tokenizer.nextToken();
    //While the line has more words
    while(tokenizer.hasMoreTokens() )
    //If Word equals "The" add 1 tot he sum
    if(Item == Policy_Num_Entered){
    //Fill in policy Number
    Policy_Number.append(Item);
    Item = tokenizer.nextToken();
    //Fill in First and Last Name
    Name.append(Item);
    //Item = tokenizer.nextToken();
    //Name.append(" " + Item);
    Item = tokenizer.nextToken();
    //Fill in Address
    Address.append(Item);
    Item = tokenizer.nextToken();
    //Address.append(" " + Item);
    //Item = tokenizer.nextToken();
    //Address.append(" " + Item);
    //Item = tokenizer.nextToken();
    //Fill in City, State and Zip Code
    City_St_Zip.append(Item);
    Item = tokenizer.nextToken();
    //City_St_Zip.append(" " + Item);
    //Item = tokenizer.nextToken();
    //City_St_Zip.append(" " + Item);
    //Item = tokenizer.nextToken();
    //Fill in Loan Balance
    LoanBal.append(Item);
    Item = tokenizer.nextToken();
    //Fill in Loan Effective Date
    LoanEffDate.append(Item);
    Item = tokenizer.nextToken();
    //Fill in Maturity Date
    MatDate.append(Item);
    Item = tokenizer.nextToken();
    //Take all the words that are left to fill in Notes
    //while(tokenizer.hasMoreTokens() ){
    Notes.append(" " + Item );
    Item = tokenizer.nextToken();
    //end of while has more tokens
    //Item found so change to 1
    sucess = 1;
    //Break out of the loop
    break;
    }//end of If
    //Grab the next word
    Item = tokenizer.nextToken();
    }//end of while tokenizer
    }//end of while
    //Read the next line
    line = br.readLine();
    }//for loop
    if(sucess == 0)
    JOptionPane.showMessageDialog(Finalapp.this, "I'm sorry the Policy " +
    Policy_Num_Entered + " was not found. Please try "+
    "again.");
    //Close the buffered Reader, and close the .dat file
    br.close();
    }//End of try
    //Catch any errors that may have occured in the reader
    catch(IOException exception)
    exception.printStackTrace();
    }//end of catch
    }//end of GetFile

    Ok I know that my line reader was messing up, so it was never running the loop, my new code reads like this...
    public void GetFile(){
    //User's entered policy number is stored here
    String Policy_Num_Entered = SearchFor.getText();
    /*If the the policy is found in loans.txt, sucess will be changed to 1,
    otherwise it will stay 0 and be used to output a "I'm Sorry message*/
    int sucess = 0;
    //Try Catch Block
    try{
    BufferedReader br = new BufferedReader(new FileReader("loans.txt"));
    /*FileInputStream file = new FileInputStream("c:\\loans.txt");
    BufferedReader br = new BufferedReader( new InputStreamReader( file) );*/
    //Access the first line of loans.txt
    String line = br.readLine();
    //Read the # of lines in loans.txt
    LineNumberReader read = new LineNumberReader(new FileReader("loans.txt"));
    //Assign the # of lines to count
    int count = 7;//read.getLineNumber();
    Policy_Number.append(count + " ");
    //Item being looked by the String Tokenizer
    String Item = null;
    //For loop, looping the # of times a line must be read
    for(int x = 0; x < count; x++){
    //While Line is not empty, proceed
    while ( line != null )
    //Read individual words of the line from loans.txt
    StringTokenizer tokenizer = new StringTokenizer(line, "|");
    Item = tokenizer.nextToken();
    //While the line has more words
    while(tokenizer.hasMoreTokens() )
    //If Word equals "The" add 1 to the sum
    if(Item == Policy_Num_Entered){
    //Fill in policy Number
    Policy_Number.append(Item);
    Item = tokenizer.nextToken();
    //Fill in First and Last Name
    Name.append(Item);
    Item = tokenizer.nextToken();
    //Fill in Address
    Address.append(Item);
    Item = tokenizer.nextToken();
    //Fill in City, State, ZIp Code
    City_St_Zip.append(Item);
    Item = tokenizer.nextToken();
    //Fill in Loan Balance
    LoanBal.append(Item);
    Item = tokenizer.nextToken();
    //Fill in Loan Effective Date
    LoanEffDate.append(Item);
    Item = tokenizer.nextToken();
    //Fill in Maturity Date
    MatDate.append(Item);
    Item = tokenizer.nextToken();
    //Take all the words that are left to fill in Notes
    Notes.append(" " + Item );
    Item = tokenizer.nextToken();
    //Item found so change to 1
    sucess = 1;
    //Break out of the loop
    break;
    }//end of If
    //Grab the next word
    Item = tokenizer.nextToken();
    }//end of while tokenizer
    //Read the next line
    line = br.readLine();
    }//end of while
    }//for loop
    if(sucess == 0)
    JOptionPane.showMessageDialog(Finalapp.this, "I'm sorry the Policy " +
    Policy_Num_Entered + " was not found. Please try "+
    "again.");
    //Close the buffered Reader, and close the .dat file
    br.close();
    }//End of try
    //Catch any errors that may have occured in the reader
    catch(IOException exception)
    exception.printStackTrace();
    }//end of catch
    }//end of GetFile

  • How Do I read a String as an XML and reply?

    Hello there to everyone reading my Post !
    I am entering a total new subject in my learning about Java Programming, where I will need to interact with a server, I was wondering If somebody could help me with a Question I have; here it is:
    A server provided me a Socket, (and that is of course an IP address and a Port), And I am supposed to connect to that server using a Java program that connects to servers using a Socket class, then I am supposed to send a String representing a valid XML, and then the server replies me With another String representing a valid XML which I am supposed to store in a String type.
    Is this exact write/read operation possible? If so, could someone please give me some code to solve this problem?
    PD: The server Does this operation only: recieve/send Strings. as its called transactional switch.
    Sorry If I have put this Query in the Wrong Forum, I have put it in Networking also, just in case. Excuse me for any inconveniences.
    Message was edited by:
    BCE_Jose

    I am supposed to send a String representing a valid XML.what do you mean? do you want to send value that you get from XML doc or what? cos i don't understand about "String representing a valid XML". is it XML document exists or not? can you give us more detail about what you asking for.

  • String type container element truncated in email

    Hi Folks
    In the email step of the workflow I have used a string type variable ( Notes of approver of ESS workflow ). The variable is populated completely in the container element in workflow log, but in the email body it's getting truncated after about 80 characters. I did apply the note 975947 but it did not help. Appreciate if anyone can let me know the fix for this.
    Regards
    Rajeev

    I Know that EMAIL subject has a limitation upto 80 characters.
    so you can do like this, create a internal table with one variable of 132 chanracters.
    Pass this variable to that table.
    so while inserting the table in email body, you will be asked to choose one of the options.
    there you choose an with line break, it will appear in your editor as&it_tab##&.
    Then definitely all the contents will be displayed.

  • App for editing/reading/writing Excel, Word, Windows notepad text documents

    I was wondering if any of you's could recommend some apps (from experience) that would allow me to, edit/read/write Excel, Word, Windows notepad text documents.
    I could make do with an app that would do the above but without the ability to create, edit Windows notepad text documents. But been able to read, write, edit Word and Excel documents would have to be a must.
    Thanks in advance.

    Thanks everyone for the help it was much appreciated.
    After debating, I decided on Docs To Go at £9.99. For this amount its a universal app and as such I can have it installed on my iPhone as well as my iPad (which is what I have done), so £5 for to have it on each device is good value I feel. Quick Office on the other hand would have cost £8.99 for the iPad version and £5.99 for the iPhone version a total of almost £15, which is quite a bit more than I paid for Docs To Go.
    Upto now, I find Docs To Go does everything I want from it, with regards to editing, reading, writing my Excel files. I tried transferring a Microsoft Windows Notepad text document over to the iPad/iPhone, I was able to read this and also add additional text/words to it and save it too. I do use text documents sometimes because if I want to add them onto a friend's computer for example, I know that they will be able to read them because with them having a Windows PC and also my friend does not have the Microsoft Office program on their PC.
    The transferring of files from the computer to the iPhone/iPad is done via a free download of the Docs To Go desktop software program (which is both PC and Mac) compatible). You first need to go into the Docs To Go app and select 'ADD DESKTOP'. This then allows you to add a device to the Docs To Go desktop program thus enabling transfer. You are shown a pin number on the screen which you enter into the Docs To Go app, this procedure only needs to be done once.
    The Docs To Go desktop program creates a folder during installation, where all the files etc are stored that are transferred/going to be transferred over are kept.
    Some people might think needing to use a program to transfer files over is a bit of a nuisance, when other similar programs allow transfer via a web browser. Personally I find that those programs, the transfer is a bit cumbersome and can be a bit slow. I find the transfer via the Docs To Go desktop program is a lot easier and faster than using the web browser. The only downside I can see with needing to use the Docs To Go desktop program is that.. If I am at a friend's house and want to transfer something on to my iPhone/iPad. My friend would need to install the program, but saying that, its a very small program and its not a big deal having to install it. If they didn't want to install it, then there is either emailing the file or transferring the file to my Dropbox account. I forgot to mention that Docs To Go supports cloud/online storage such as Dropbox, GoogleDocs as well as others.
    Once the above is done, you switch the wifi on, load the Docs To Go app, load the Docs To Go desktop program. You then just drag and drop the folders etc that you are wanting transferred over into the The Docs To Go desktop program, then you click on the circular arrow button and they are then transferred over onto the iPhone/iPad.
    Once on the iPhone/iPad, you can view them, add additional information, when you make any changes you can press the circular arrow symbol (bottom left of the Docs To Go app) on the Docs To Go app and the changes are then synced back to the same file that is stored on the computer, so its very easy to keep everything in sync and up to date.
    It is possible whilst using a Microsoft Word document to have a word count, you just touch the symbol at the bottom right of the Docs To Go app and choose Word Count from the drop down menu. I have heard a few people in some reviews saying that 'Docs To Go doesn't have a word count', when indeed it does.
    One surprise is that Docs To Go, does not have a spell checker, but hopefully during later updates, the feature might be added. I sent my feedback to Docs To Go requesting this feature on future releases. I expect that there will be many other people who have requested this feature too.
    I just thought I would share my experience with using Docs To Go.
    Thanks again everyone for the help, it was much appreciated

  • Textarea with Read Only Condition Type

    A have a textarea (database field with Varchar2(4000) with the Read Only Condition Type set to Request != Expression 1. Works fine, except that data presented as a long 1 line text (like a Displayed text) when condition meet (no vertical scrollbar).
    Am i missing some additional settings.

    the easiest way to get the read-only version of your textarea item to appear more like your read/write version is to add some style specifications into the "Read Only Element Table Cell(s) Attributes" field that's right below where you specified your read-only conditions ("Expression 1" and "Expresssion 2"). as the name suggests, values entered into that field end up in the table data tag for the cell in which your read-only content is placed. added style specifications for height and width would help you control how the text is spread across your page. you can/should also consider using background and color style attributes to color the table cell the way we're used to seeing read-only data ("grayed out"). so though my colors are way off, a string like this...
    style="width:16px;height:30px;background:#C5D5C5;color:666666;font-weight:bold;font-size:12pt"
    ...in that "Read Only Element Table Cell(s) Attributes" field would format your read-only data closer to what you're going for. at the least, it'd give you an idea for the type of control you have.
    for extremists, there's also another approach: if you want absolute and total control over the way your textarea item's data is displayed, you could display your item's data in an HTML region instead of as the item directly. for instance, you mentioned you liked that scroll bar. you could achieve the scroll bar by defining your table, the scroll bar class, and table cell in an HTML region. say we saved your textarea item's data to a hidden item called P1_MY_TEXTAREAS_DATA. i'm pretty sure this html would let you show that data in that scrollable non-updatable format you're shootin' for...
    <style type="text/css">
    .scrollarea{
    font-size: 10pt;height:250px;width:100%;text-align:left;
    background-color:#ffffff;color:black;padding:0px 0px 0px 0px;margin:0px;overflow: auto;
    float:left;}
    </style>
    <div class="scrollarea">
    <table summary="" width="100%"><tr>
    <td style="width:16px;height:300px;border:4px;margin-left:4px;margin-right:9px">
    &P1_MY_TEXTAREAS_DATA
    </td></tr></table><div>
    ...see? by defining your own table, you get the easy opportunity to wrap it in those div tags that call the scrollarea class. also note that i just referenced the content of your textarea item with that ampersand syntax (&P1_MY_TEXTAREAS_DATA). you could, of course, keep things cleaner by defining your scrollarea class in a css, but that's your call.
    hope this helps,
    raj

  • Log the local variables (string type) to the database (SQL Server)

    i have a customized PreUUT callback so that my own VI gets the information from barcode. it contains serial number as well as other information. i am collecting the information into local variables of the PreUUT callback.
    Now i want to log the local variables (string type) to the database (SQL Server).
    i have a successful connection to the database and i am using a generic recordset schema.
    can anyone help me how to do it?
    also shall i have to create the corrosponding fields (columns) in the database? or is there any option in TestStand4.0 to do it?

    Hello i like original,
    After re-reading your original message, I think I might have a better understanding of what you would like to do.  I have included a few links to Knowledge Base and Developer Zone articles that should be very useful for you.  I have included these links below:
    Logging a New UUT Property to a Database in TestStand
    Logging a New Step Property to a Database in TestStand
    Creating a TestStand Database Schema from Scratch
    Thanks,
    Jonathan C
    Staff Application Engineering Specialist | CTD | CLA
    National Instruments

  • Still need help with case sensitive strings

    Hello guy! Sorry to trouble you with the same problem again,
    but i still need help!
    "I am trying to create a scrypt that will compare a String
    with an editable text that the user should type to match that
    String. I was able to do that, but the problem is that is not case
    sensitive, even with the adobe help telling me that strings are
    case sensitive. Do you guys know how to make that comparison match
    only if all the field has the right upper and lower case letters?
    on exitframe
    if field "t:texto1" = "Residencial Serra Verde"then
    go to next
    end if
    end
    |----> thats the one Im using!"
    There were 2 replys but both of them didnt work, and the
    second one even made the director crash, corrupting even previously
    files that had nothing to do with the initial problem..
    first solution given --
    If you put each item that you are comparing into a list, it
    magically
    makes it case sensitive. Just put list brackets around each
    item.
    on exitframe
    if [field "t:texto1"] = ["Residencial Serra Verde"] then
    go to next
    end if
    end
    Second solution given--
    The = operator is not case-sensitive when used on strings,
    but the < and > operators are case-sensitive.
    So another way to do this is to check if the string is
    neither greater than nor less than the target string:
    vExpected = "Residencial Serra Verde"
    vInput = field "t:texto 1"
    if vExpected < vInput then
    -- ignore
    else if vExpected > vInput then
    -- ignore
    else
    -- vExpected is a case-sensitive match for vInput
    go next
    end if
    So any new solutions??
    Thanks in advance!!
    joao rsm

    The first solution does in fact work and is probably the most
    efficient way
    of doing it. You can verify that it works by starting with a
    new director
    movie and adding a field named "t:texto1" into the cast with
    the text
    "Residencial Serra Verde" in the field. Next type the
    following command in
    the message window and press Enter
    put [field "t:texto1"] = ["Residencial Serra Verde"]
    You will see it return 1 which means True. Next, make the R
    in the field
    lower case and execute the command in the message window, it
    will return 0
    (true).
    Now that you know this works, you need to dig deeper in your
    code to find
    what the problem is. Any more info you can supply?

  • Help needed for writing query

    help needed for writing query
    i have the following tables(with data) as mentioned below
    FK*-foregin key (SUBJECTS)
    FK**-foregin key (COMBINATION)
    1)SUBJECTS(table name)     
    SUB_ID(NUMBER) SUB_CODE(VARCHAR2) SUB_NAME (VARCHAR2)
    2           02           Computer Science
    3           03           Physics
    4           04           Chemistry
    5           05           Mathematics
    7           07           Commerce
    8           08           Computer Applications
    9           09           Biology
    2)COMBINATION
    COMB_ID(NUMBER) COMB_NAME(VARCHAR2) SUB_ID1(NUMBER(FK*)) SUB_ID2(NUMBER(FK*)) SUB_ID3(NUMBER(FK*)) SUBJ_ID4(NUMBER(FK*))
    383           S1      9           4           2           3
    384           S2      4           2           5           3
    ---------I actually designed the ABOVE table also like this
    3) a)COMBINATION
    COMB_ID(NUMBER) COMB_NAME(VARCHAR2)
    383           S1
    384           S2
    b)COMBINATION_DET
    COMBDET_ID(NUMBER) COMB_ID(FK**) SUB_ID(FK*)
    1               383          9
    2               383          4
    3               383          2
    4               383          3
    5               384          4
    6               384          2          
    7               384          5
    8               384          3
    Business rule: a combination consists of a maximum of 4 subjects (must contain)
    and the user is less relevant to a COMB_NAME(name of combinations) but user need
    the subjects contained in combinations
    i need the following output
    COMB_ID COMB_NAME SUBJECT1 SUBJECT2      SUBJECT3      SUBJECT4
    383     S1     Biology Chemistry      Computer Science Physics
    384     S2     Chemistry Computer Science Mathematics Physics
    or even this is enough(what i actually needed)
    COMB_ID     subjects
    383           Biology,Chemistry,Computer Science,Physics
    384           Chemistry,Computer Science,Mathematics,Physics
    you can use any of the COMBINATION table(either (2) or (3))
    and i want to know
    1)which design is good in this case
    (i think SUB_ID1,SUB_ID2,SUB_ID3,SUB_ID4 is not a
    good method to link with same table but if 4 subjects only(and must) comes
    detail table is not neccessary )
    now i am achieving the result by program-coding in C# after getting the rows from oracle
    i am using oracle 9i (also ODP.NET)
    i want to know how can i get the result in the stored procedure itsef.
    2)how it could be designed in any other way.
    any help/suggestion is welcome
    thanks for your time --Pradeesh

    Well I forgot the table-alias, here now with:
    SELECT C.COMB_ID
    , C.COMB_NAME
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID1) AS SUBJECT_NAME1
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID2) AS SUBJECT_NAME2
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID3) AS SUBJECT_NAME3
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID4) AS SUBJECT_NAME4
    FROM COMBINATION C;
    As you need exactly 4 subjects, the columns-solution is just fine I would say.

Maybe you are looking for

  • UrgentError - oracle.jbo.RowCreateException: JBO-25017 while creating a row

    Hi, I am developing a page which would insert values into the database. However when I run the page, I get the following error: Error - oracle.jbo.RowCreateException: JBO-25017: Error while creating a new entity row for RepeatPayEO. It gives the erro

  • How to implement this typical sign workflow? Urgent

    Hi Adobe Experts, I am new to LC (two months only). Recently company is doing some evaluation on LC 8.2 and my boss assigned the following task to me  (I simplified it): Form: (Enclosed) * Two text fields: CommentTextField1 and CommentTextField2 * Tw

  • Basic networking - getting a Sun Ultra 10 on my home network

    Hello, I have a Sun Ultra 10 at home running Solaris 8. I am trying to teach myself a bit about networking so I thought I would try to get the box online. I am having little success. Hopefully someone will tell me where I'm going wrong. Here's what I

  • Current time for the X-axis in the wave chart

    I understand that the "attribute node" function is edited to show the current year/month/day/hour/minute/sec in my waveform chart. However, the default year is 1904 and trying the "attribute node" still fails. Please anyone show me the step-by-step p

  • Wifi not working after bios upgrade. [SOLVED]

    Hi All, I have just upgraded my bios to correct a freq scaling issue and have noticed that WiFi is no longer working. In dmesg I notice: p54pci 0000:06:00.0: PCI INT A disabled p54pci: probe of 0000:06:00.0 failed with error -110 Looks like something