Malformed SQL92 string at position: 227

What is wrong with the following anonymous block? I am getting an error - "Malformed SQL92 string at position: 227".
DECLARE    
  TYPE   typ_tb_bw_lg_mstr IS TABLE OF tb_bw_lg_mstr%ROWTYPE INDEX BY BINARY_INTEGER;
  my_tab typ_tb_bw_lg_mstr;
  v_sql  VARCHAR2(128);   
BEGIN
  v_sql:=q'{'SELECT * FROM tb_bw_lg_mstr WHERE system_date='31-JUL-2011'}';
  OPEN v_sql
  LOOP
    FETCH v_sql BULK COLLECT INTO my_tab LIMIT 500;
    FOR i IN my_tab.FIRST .. my_tab.LAST
    LOOP
      IF my_tab.EXISTS(i) THEN
        Dbms_Output.Put_Line( my_tab(i).sales_code ) ;
      END IF;
    END LOOP;
    EXIT WHEN v_sql%NOTFOUND;
  END LOOP;
EXCEPTION
  WHEN OTHERS THEN
    Dbms_output.put_line(SQLERRM);
END;
/

Oops, I missed two more errors. You are using v_sql as a cursor which is completely wrong. It is a string holding SQL statement text - nothing more. And I also missed SQL statement has extra quote. Use:
SQL> create table tb_bw_lg_mstr
  2  as select ename, job as sales_code,date'2011-07-31' as system_date from emp
  3  /
Table created.
SQL> set serveroutput on
SQL> DECLARE
  2    TYPE   typ_tb_bw_lg_mstr IS TABLE OF tb_bw_lg_mstr%ROWTYPE INDEX BY BINARY_INTEGER;
  3    my_tab typ_tb_bw_lg_mstr;
  4    v_sql  VARCHAR2(128);
  5    v_cur sys_refcursor;
  6  BEGIN
  7    v_sql:=q'{SELECT * FROM tb_bw_lg_mstr WHERE system_date=date'2011-07-31'}';
  8    OPEN v_cur FOR v_sql;
  9    LOOP
10      FETCH v_cur BULK COLLECT INTO my_tab LIMIT 500;
11      FOR i IN my_tab.FIRST .. my_tab.LAST
12      LOOP
13        IF my_tab.EXISTS(i) THEN
14          Dbms_Output.Put_Line( my_tab(i).sales_code ) ;
15        END IF;
16      END LOOP;
17      EXIT WHEN v_cur%NOTFOUND;
18    END LOOP;
19  EXCEPTION
20    WHEN OTHERS THEN
21      Dbms_output.put_line(SQLERRM);
22  END;
23  /
CLERK
SALESMAN
SALESMAN
MANAGER
SALESMAN
MANAGER
MANAGER
ANALYST
PRESIDENT
SALESMAN
CLERK
CLERK
ANALYST
CLERK
PL/SQL procedure successfully completed.
SQL> SY.

Similar Messages

  • Java.sql.SQLException: Non supported SQL92 token at position: 377:

    hi,
    i have to create oracle-java source from java program. my code is :
    ( In Java which create java source in oracle)
    strQuery = "CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED
    \"ASCOMPONENT\" AS ";
    strQuery += "import javax.xml.parsers.DocumentBuilderFactory; ";
    strQuery += "import javax.xml.parsers.DocumentBuilder; ";
    strQuery += "import org.xml.sax.SAXException; ";
    strQuery += "import org.xml.sax.SAXParseException; ";
    strQuery += "import org.w3c.dom.Document; ";
    strQuery += "import org.w3c.dom.*; ";
    strQuery += "import java.io.*; ";
    strQuery += "import oracle.jdbc.driver.*; ";
    strQuery += "import java.sql.*; ";
    strQuery += "public class ASComponent ";
    strQuery += "\n ";
    strQuery += "{ "; // error here.../
    strQuery += "\n ";
    strQuery += "public static void readXML(String strXML,String
    strTable) ";
    strQuery += "\n ";
    strQuery += "{ ";
    strQuery += "\n ";
    strQuery += " } ";
    strQuery += "\n ";
    strQuery += " } ";
    strQuery += "\n ";
    System.out.println("Query = " + strQuery);
    stmt.executeQuery(strQuery);
    i am getting error :
    java.sql.SQLException: Non supported SQL92 token at position: 377:
    so, what is that error ?
    i think when it is getting '{ ' it is giving error...?
    how we can use token '{}' in jdbc.
    so, what is the error..?
    please help me its urgent..
    Thanks in advance...

    thanks for reply.
    according to my project requirement i have to execute that script using my java program.
    java source which i am creating in oracle is :
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "ASCOMPONENT" AS
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import org.w3c.dom.Document;
    import org.w3c.dom.*;
    import java.io.*;
    import oracle.jdbc.driver.*;
    import java.sql.*;
    public class ASComponent
    public static void readXML(String strXML,String strTable)
    // code here
    when i am creating above program from sql prompt, it works fine.
    but when i am creting that from java program, it is giving me exception.
    my java code to create above script is :
    conn = getConnection();
    stmt = conn.createStatement();
    strQuery = "CREATE OR REPLACE AND RESOLVE JAVA SOURCE
    NAMED \"ASCOMPONENT\" AS ";
    strQuery += "\n ";
    strQuery += "import javax.xml.parsers.DocumentBuilderFactory; ";
    strQuery += "\n ";
    strQuery += "import javax.xml.parsers.DocumentBuilder; ";
    strQuery += "import org.xml.sax.SAXException; ";
    strQuery += "import org.xml.sax.SAXParseException; ";
    strQuery += "import org.w3c.dom.Document; ";
    strQuery += "import oracle.jdbc.driver.*; ";
    strQuery += "import java.sql.*; ";
    strQuery += "public class ASComponent ";
    strQuery += "\n ";
    strQuery += " { ";
    strQuery += "\n ";
    strQuery += "public static void readXML(String strXML,String strTable) ";
    strQuery += "\n ";
    strQuery += " { ";
    strQuery += "\n ";
    strQuery += " } ";
    strQuery += "\n ";
    strQuery += " } ";
    strQuery += "\n ";
    System.out.println("Query = " + strQuery);
    stmt.executeQuery(strQuery);
    so, how we can create above sql script from java program ?
    i think token " { } " is not supporting that...
    please reply , its urgent....

  • Malformed Guid String

    I have been getting the message "Malformed Guid String" in my event window - little red circle cross thing bottom right of timeline. It doent seem terminal.

    I was testing speech analysis(right click on clip in project panel>analyze content), than Media Encoder renders that preview in Temp folder, creating metadata, etc. Than I deleted that rendered files from Temp folder. And I got same message, so, Premiere tells you that something missing. And this is not application problem, just someting deleted that is related to Premiere.

  • Non supported SQL92 token at position: 887: Message -regarding javamail api

    I executed a procedure in java for sending mail.
    But ended in exception which is shown below.
    " 17034 : null : java.sql.SQLException: Non supported SQL92 token at position: 887: Message
    java.sql.SQLException: Non supported SQL92 token at position: 887: Message
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.ja "
    how to add more api's in Odi.
    is it the jar files to store in ODI\jre\lib directory .
    I did it but again exception .
    plz reply a suggestion,
    thanks in advance
    sanal

    I Think U need to set the path of jar files in classpath Enviroment variable

  • Non supported SQL92 token at position: 32531: OVERFLOW

    While using Jdevloper9i to edit/create Oracle PL/SQL stored procedure Web Application that has { or } bracket in it gives me the following error:
    Non supported SQL92 token at position: 32531: OVERFLOW
    I know internally Jdevloper uses JDBC to connect to database and if you have setEscapeProcessing turned on then it craps out. The question is how am I going to turn that off on Jdeveloper or can I?
    Thanks!

    Just to confirm, can you state what version of JDeveloper you're using? (9.0.2 Production, or 9.0.3 Developer's Preview?)
    Reading this reminded me of a bug I filed (#2237101) that is fixed in 9.0.3 Dev Preview, but might not be the same issue. Here is the bug report for that particular problem.
    [OTN Thread: Re: Optimistic Locking and web-based transaction
    Pressing [Ctrl]-[Shift]-[F9] to "Make" a PL/SQL package corrupts
    the source code of the PL/SQL package by turning question mark
    characters into JDBC bind variable place holders.
    In the user's testcase, the line:
    d := utl_tcp.write_line(c, '<?xml version=' || DQUOTE || '1.0' || DQUOTE ||
    '?>');
    Is turned into:
    d := utl_tcp.write_line(c, '<:1xml version=' || DQUOTE || '1.0' || DQUOTE
    || ':2>');
    which corrupts the test and ruins the functionality of his routine that's
    trying to output XML.
    Using the OTN user's testcase, I'm able to reproduce the problem
    he is reporting, however, with a smaller testcase the problem
    does not reproduce.
    WORKAROUND: Define a constant for the question mark character, and use
    ----------  the constant instead of the literal question mark.

  • Problem with Compression (Deflater & GZip)

    Hi All,
    I've large data as a String which I need to save in Oracle in VARCHAR2 column. As Varchar2 allows maximum of 4000 characters, I wish to compress this String and save in DB.
    I tried to compress the String using Delfater and GZip. In both methods I uses Streams concep (DeflaterOutputStream, GZipOutputStream) and both Classes have the option to return the Compressed data in byte[] and String format.
    When I returned in String format, the same String is giving error while decompressing "java.util.zip.ZipException: incorrect data check". How to solve this problem.
    When I tried to save the compressed String in DB (Oracle),
    initially I got the error "java.sql.SQLException: Malformed SQL92 string at position: 1109"
    and later I tried to save like this 'strCompressed.replace("'","''") i.e., I replaced all single quotes to 2-single quotes and the error message is "java.sql.SQLException: ORA-00911: invalid character".
    Is there any character to replace in the compressed String. and how to solve the problem with decompression.
    Please help me in this.
    Thanks in advance.
    Regards
    Pavan Pinnu.

    both Classes have the option to return the Compressed data in byte[] and String format.Don't do that. String is not a container for binary data. You can't use it for compressed data. Use the byte[], send the byte[] to the database, get it back from the database, uncompress it, and then turn that back into a String.

  • Error calling function in Oracle

    Hi All,
    I am calling the function in Oracle the following way
    cs = conn.prepareCall( "{? = CALL package_name.function_name(?)}" );
    But on the above line in my code, I am getting the error
    java.sql.SQLException: Malformed SQL92 string at position: 5. Expecting "call"
    Did anybody run into same issue?
    Thanks

    Until something slicker comes up:
    try {
    String sql = "select RISK.HVAR_MAINT.FNV_GET_PARTITION_NAME(?,'04-mar-2003') as theValue from dual ";
    // Connection conn = getConnection();
    CallableStatement stmnt = conn.theConnection.prepareCall(sql);
    stmnt.setString(1,"hvar_mtm") ;
    stmnt.execute();
    ResultSet rs = stmnt.getResultSet() ;
    while ( rs.next() ) System.out.println(rs.getString("theValue") ) ;
    rs.close() ;
    } catch (Exception e) {
    System.out.println(e.getMessage() ) ;
    Note: I have not been able to get "CALL" to work in Oracle
    May be the next guy cal get conn.prepareCall( "{? = CALL package_name.function_name(?)}" ); to work

  • Oracle Store procedure Docu. Ex throws error ?!!!!

    The following are the Oracle Docu. Contents on Store Procedures.
    I could create same Function and added the same java codes to a JSP but it throws error as
    java.sql.SQLException: Malformed SQL92 string at position: 5. Expecting "call"
    Code is as follows
    JDBC and SQLJ allow you to call PL/SQL stored functions and procedures. For example, suppose you want to call the following stored function, which returns the balance of a specified bank account:
    FUNCTION balance (acct_id NUMBER) RETURN NUMBER IS
    acct_bal NUMBER;
    BEGIN
    SELECT bal INTO acct_bal FROM accts
    WHERE acct_no = acct_id;
    RETURN acct_bal;
    END;
    From a JDBC program, your call to the function balance might look like this:
    CallableStatement cstmt = conn.prepareCall("{? = CALL balance(?)}");
    cstmt.registerOutParameter(1, Types.FLOAT);
    cstmt.setInt(2, acctNo);
    cstmt.executeUpdate();
    float acctBal = cstmt.getFloat(1);
    Can any one Advise
    Abhiash

    change line
    CallableStatement cstmt = conn.prepareCall("{? = CALL
    balance(?)}");
    to
    CallableStatement cstmt = conn.prepareCall("{? = call
    balance(?)}");
    i.e. lowercase 'call'
    hope it solves

  • Enhancement request: Namespace for Javascript

    Carl:
    As APEX market penetration grows and it matures as a web development environment, we will start to see APEX applications integrate one (or more) of the fantastic Javascript toolkits out there to build rich client-side functionality.
    To avoid collisions and in accordance with Javascript best practices, may I suggest that all APEX Javascript functions be encapsulated in a global APEX (or OAE or whatever) namespace/Javascript object. All APEX Javascript objects, methods, functions, variables, etc should be included in this namespace. We can always create local instances of commonly used functions/objects to maintain backward compatibility.
    Just my 2c.
    Thanks

    I'm seeing the same problem; it will let me view Java code, and edit it in the editor, but there's no way of saving it back to the database, or compiling (or debugging or etc...)
    Also, if I try and run java in via the sql window I get:
    Error starting at line 1 in command:
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "whatever" AS
    Error report:
    Non supported SQL92 token at position: 227:
    Don't really know what that error message is for; is that column or row? I can't see either displayed for the sql window anyway. No clue what token it's talking about either - would be useful for it to give a better error message than that.
    thanks,
    William

  • Enhancement Request: Actions for JAVA Sources (compile to CLASS)

    Hi All,
    I would like to change my JAVA Source in the DATABASE and compile it again. At the moment I can see only the code but have no actions to compile and generate it to classes. Is this planned for a future release? AS a LAYOUT idea ... if classes can not be displayed I would suggest to remove them from the tree - they are not needed to display as far as I can see a compiled SOURCE. Will Raptor provide this for the future??
    Message was edited by:
    Frank C. Hoffmann
    Message was edited by:
    Frank C. Hoffmann

    I'm seeing the same problem; it will let me view Java code, and edit it in the editor, but there's no way of saving it back to the database, or compiling (or debugging or etc...)
    Also, if I try and run java in via the sql window I get:
    Error starting at line 1 in command:
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "whatever" AS
    Error report:
    Non supported SQL92 token at position: 227:
    Don't really know what that error message is for; is that column or row? I can't see either displayed for the sql window anyway. No clue what token it's talking about either - would be useful for it to give a better error message than that.
    thanks,
    William

  • MODEL clause to process a comma separated string

    Hi,
    I'm trying to parse a comma separated string using SQL so that it will return the parsed values as rows;
    eg. 'ABC,DEF GHI,JKL' would return 3 rows;
    'ABC'
    'DEF GHI'
    'JKL'
    I'm thinking that I could possibily use the MODEL clause combined with REGULAR expressions to solve this as I've already got a bit of SQL which does the opposite ie. turning the rows into 1 comma separated string;
    select id, substr( concat_string, 2 ) as string
    from (select 1 id, 'ABC' string from dual union all select 1, 'DEF GHI' from dual union all select 1, 'JKL' from dual)
    model
    return updated rows
    partition by ( id )
    dimension by ( row_number() over (partition by id order by string) as position )
    measures ( cast(string as varchar2(4000) ) as concat_string )
    rules
    upsert
    iterate( 1000 )
    until ( presentv(concat_string[iteration_number+2],1,0) = 0 )
    ( concat_string[0] = concat_string[0] || ',' || concat_string[iteration_number+1] )
    order by id;
    Can anyone give me some pointers how to parse the comma separated string using regexp and create as many rows as needed using the MODEL clause?

    Yes, you could do it without using ITERATE, but FOR ... INCREMENT is pretty much same loop. Couple of improvements:
    a) there is no need for CHAINE measure
    b) there is no need for CASE in RULES clause
    c) NVL can be applies on measures level
    with t as (select 1 id, 'ABC,DEF GHI,JKL,DEF GHI,JKL,DEF GHI,JKL,DEF,GHI,JKL' string from dual
       union all
        select 2,'MNO' string from dual
        union all
       select 3,null string from dual
    SELECT  id,
             string
      FROM   T
       MODEL
        RETURN UPDATED ROWS
        partition by (id)
        DIMENSION BY (0 POSITION)
        MEASURES(
                 string,
                 NVL(LENGTH(REGEXP_REPLACE(string,'[^,]+','')),0)+1 NB_MOT
        RULES
         string[FOR POSITION FROM  1 TO NB_MOT[0] INCREMENT 1] = REGEXP_SUBSTR(string[0],'[^,]+',1,CV(POSITION))
    SQL> with t as (select 1 id, 'ABC,DEF GHI,JKL,DEF GHI,JKL,DEF GHI,JKL,DEF,GHI,JKL' string from dual
      2     union all
      3      select 2,'MNO' string from dual
      4      union all
      5     select 3,null string from dual
      6      )
      7   SELECT  id,
      8           string
      9    FROM   T
    10     MODEL
    11      RETURN UPDATED ROWS
    12      partition by (id)
    13      DIMENSION BY (0 POSITION)
    14      MEASURES(
    15               string,
    16               NVL(LENGTH(REGEXP_REPLACE(string,'[^,]+','')),0)+1 NB_MOT
    17              )
    18      RULES
    19      (
    20       string[FOR POSITION FROM  1 TO NB_MOT[0] INCREMENT 1] = REGEXP_SUBSTR(string[0],'[^,]+',1,CV(POSITION))
    21      )
    22  /
            ID STRING
             1 ABC
             1 DEF GHI
             1 JKL
             1 DEF GHI
             1 JKL
             1 DEF GHI
             1 JKL
             1 DEF
             1 GHI
             1 JKL
             2 MNO
            ID STRING
             3
    12 rows selected.
    SQL> SY.

  • Get distinct values from a coma seperated string variable

    Hi ,
    I am getting an comma seperated string as in parameter, now i want to get the distinct values from that string and will use those values to pass it to a query.
    any help

    try this:
    sorry about the messiness - it's just quickly copied from some badly formatted code....
    TYPE T_FieldArray IS TABLE OF varchar2(255) INDEX BY BINARY_INTEGER;
    function SPLIT_CSV_FIELDS (
    p_Input_Str in varchar2,
    p_Delimiter in varchar2,
    p_Quote_Char in varchar2)
    return t_fieldarray is
    v_FieldArray T_FieldArray;
    v_input_str varchar2(4000);
    v_field_str varchar2(255);
    v_pos number;
    e number := 0;
    v_delim_str varchar2(3);
    cur_pos number;
    begin
    loop
    -- find each delimiter char in string
    v_pos := INSTR(v_input_str, p_Delimiter);
    -- each time delimiter char is found
    if v_pos > 0 then
    -- current field value is current string to position prior to delimiter char
    v_field_str := UPPER(SUBSTR(v_input_str, 1, v_pos - 1));
    -- remove quote char from end of field (if any)
    v_field_str := TRIM(TRANSLATE(v_field_str, NVL(p_Quote_Char, p_Delimiter), ' '));
    -- increment element number
    e := e + 1;
    -- get remainder of input string to check
    v_input_str := SUBSTR(v_input_str, v_pos + 1, LENGTH(v_input_str) - v_pos);
    v_FieldArray(e) := v_field_str;
    else
    -- increment element number
    e := e + 1;
    -- last field value is what's left of input string less quote char (if any)
    v_field_str := TRIM(TRANSLATE(UPPER(v_input_str), NVL(p_Quote_Char, p_Delimiter), ' '));
    v_FieldArray(e) := v_field_str;
    exit;
    end if;
    end loop;
    return v_FieldArray;
    end;

  • Non supported SQL92 token error

    DB: 9.2.0.6.0
    SQLDev 1.0.0.15.57
    Error 'Non supported SQL92 token at position: xxxx: APL was raised because I had braces '{ }' in my comments:
    eg
    -- stuff {APL, STUFF}
    Weird thing is that an error raised when running statement (ie. using F9) but was NOT raised when running as script (ie using F5).
    Removing the braces worked.

    I am using 9.2 on Sun OS and get a similiar error when trying to compile in Enterprise Manager. I am using the Web Server Generator to gen html with some java script in it...the braces seem to be causing the parser to revolt!
    My code is as follows
    BEGIN
    WSGL.OpenPageHead(''||' : '||'Texas Register');
    regviewer$ext.TemplateHeader(TRUE,0);
    htp.p('<SCRIPT>');
    htp.p('<!-- Hide from old browsers');
    htp.p('function backbu() {');
    htp.p('history.back()');
    htp.p('return null;');
    htp.p('}');
    htp.p('function forwardbu() {');
    htp.p('history.forward()');
    htp.p('return null;');
    htp.p('}');
    htp.p('//-->');
    htp.p('</SCRIPT>');
    proctac.jlib(3);
    WSGL.ClosePageHead;
    Has this been resolved? Our db should be up to date on any patches. Going to transition to 10 or 11 at the end of the year but I am just trying to do some edits on a package and can't get past the parser.
    Thanks for any help.
    Bryan
    Edited by: ca106255 on Sep 29, 2008 4:03 PM

  • Search for string and move decimal

    Hello,
    I am trying to write code that will search for a fractional string within an array and convert it from mV to V so it can be properly compared to the other fractional string numbers in the array.
    I have an array that outputs x iterations  each with a minimum and maximum column including several different types of decimal strings (negative/positive with several decimal places) each ending with either mV and V (example string: -725.543mV).
    I then split the array into columns containing the minumum and maximum values of each iteration. I want to compare the minimum values of each iteration and find the most minimum, and do the same thing with the maximum values.
    Unfortunatley the way I'm doing it, when I convert from fractional string to number it removes the V or mV unit label but does not convert the number from mV to V. so it compares -725.543mV with -52.334V as -725.543 & -52.334 thus declaring the mV value the most minimum. I need the program to recognize that mV is less than V or search each array for values labeled with mV and move the decimal place so it is in standard V format.
    The unit label is actually part of the string and not the display (as you can see in the code I've attached) and I understand this is a little tricky with the way I have to do it. But this is a dumbed down chunk of code I will eventually incorporate into my larger program which reads the values and their units from several different types of oscilloscopes. The Scopes output the values as strings as they appear on the screen and don't differentiate between mV and V unless they are told to output the units which just tags them on the end of the string.
    I'm sorry for the large post. SO to sum up I need to search an array to make sure all values have the same units, if they don't I need to convert each value to the proper unit and output the max and min from the resulting array. my code is attached. Thank you for your help.
    Solved!
    Go to Solution.
    Attachments:
    File manipulation.vi ‏15 KB

    crossrulz wrote:
    jcarmody wrote:
    camerond wrote:
    Sorry, Jim, that's not quite right. You forgot to consider significant figures (your third min is not quite right). [...]
    Good catch, but, really?   
    That "Finally!" comes out to -5569492V to me.  Holy crap.  -5.569492MV!  I think there's a problem there.
    Carp! Stupid negative numbers, shouldn't be allowed. Put a piece of duck tape over the place for that negative sign, that'll fix it.
    I'll get back, it's now a matter of principle.
    Jim, how does your algorithm do when there are 8 or 9 sig figs, say -56.9492345mV? (Yep, too lazy to draw it in myself.)
    Cameron
    To err is human, but to really foul it up requires a computer.
    The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
    Profanity is the one language all programmers know best.
    An expert is someone who has made all the possible mistakes.
    To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
    LabVIEW Unit 1 - Getting Started
    Learn to Use LabVIEW with MyDAQ

  • Problems with indexOf reading from an updating string

    String[][] shapeArray = new String[5][2];
    int isCol;
    int isCom;
    String outputsub1 = finoutput;  // finoutput is holding text imported from a file
    String outputsub2;
    for (int y = 0; y < 2; y++)
         for (int x = 0; x < 5; x++)
              isCol = outputsub1.indexOf(":");
                   isCom = outputsub1.indexOf(",");
                  if (x == 4 && y == 1)
                   shapeArray[x][y] = outputsub1.substring((isCol+2));
              else
                       shapeArray[x][y] = outputsub1.substring((isCol+2),isCom);
                  outputsub2 = outputsub1.substring(isCom+2);
                  outputsub1 = (outputsub2);
    }the text imported looks like this...
    Shape: Circle, Position: 100, 250, Size: 130, 130, Colour: Blue, Fill: yes
    Shape: Rectangle, Position: 300, 250, Size: 110, 110, Colour: Red, Fill: no
    i would use a string tokeniser, but i need to use this method. im trying to shorten the string each time so that the indexOf will find the next ":" each time. However when i try and update the string holding the updated data (outputsub1) i get the following error:
    java.lang.StringindexOutOfBoundsException: String index out of range: -8
    at java.lang.String.substring(String.java:144)
    at ReadFile.init(ReadFile.java:52)
    at sun.applet.AppletPanel.run(AppletPanel.java:353)
    at java.lang.Thread.run(Thread.java:534)
    i hope that makes sense to someone, it only occurs when i add the line..
    outputsub1 = (outputsub2);
    and works fine when i comment it out (although doesnt give the right response obviously.)
    thankyou for any help you can offer

    String index out of range: -8 simply means that you try to access the String at position "-8", which obviously makes no sense. There must be some mistake either in your code or your algorithm. Keep in mind that indexOf returns -1 in case the argument wasn't found - maybe that's the reason for that error.

Maybe you are looking for

  • Calling Sql Loader In Apex

    Hi All, Is there any way to call the sql loader in Apex to load the table with csv data. Thanks in advance Dhan

  • My iMac will not connect to my display

    Hello, I just started using a second monitor (it's brand is Dynex but I don't know any other specs for the TV) for my iMac 2.7 GHz Intel Core i5 and I connected it via HDMI cable and mini displayport. After I turned on my second monitor, my iMac scre

  • Getting Captivate to Communicate with QuestionMark

    I am trying to use a Captivate simulation in Perception QuestionMark. I have successfully exported the file into QuestionMark, but QuestionMark and Captivate are not communicating regarding the score or the completion status. At the end of my Captiva

  • Is an audio interface really necessary?

    Ok, right now I have my condenser mic hooked up to a phantom power and from the phantom power to the computer. All my recordings come out clear and loud. But my friend told me that if I get an audio interface, my recordings will sound much better. We

  • 802.1x / dot1x Authentication, including Voice-Vlan and Guest-Vlan

    Hello, i have tried to configure a dot1x based Authentication. With an single host including guest-vlan, everything works fine. But i want to use an IP-Phone (wich is every times authenticated) and behind the Phone an Client. Is there a possible solu