Reading Data in Console

Hi People!
I am developing a standalone application using Java. My application is running in console.(command prompt).
So, I want to read Ctrl+C when user tries to break the application in console.
I have to read it in Java when the user presses Ctrl+C and store it in a string. Thats it.
Please solve this ASAP. It is urgent.
Thanks & Regards,
BalaChandu

BalaChandu wrote:
I have to read it in Java when the user presses Ctrl+C and store it in a string. Thats it. please search this forum. This question has been asked at least monthly and you will get a decent answer by searching. My thinking on this is that you can't do this with the standard java console, but there are alternatives to the standard console that may take in single character input.
Please solve this ASAP. It is urgent. never, never, NEVER say "solve this ASAP" or "it is urgent" in this forum. It is guaranteed to get your flamed. Your saying it is urgent means that you think:
* your post is more important than any other post in this forum. Let me assure you that it is not.
* YOU are more important than any other person in this forum. Again, let me assure you that you are not.
* that the volunteers in this forum should stop what they are doing, stop their work, their play with their families, their lives because we think that your problem is a matter of life or death to us. Again, let me assure you that we do not.
Good luck in your coding
Pete

Similar Messages

  • Error reading data from the MS Dos Console.

    Hi,
    We have a legacy application which is launched via a 3rd-party Telnet Server - the app acts as a remote shell for an RF device. The system has been functioning for many years but now we have migrated to Server 2012 the system no longer launches.
    The RF device successfully connects to the telnet server, logs-in with embedded credentails but drops the connection when the shell application is launched.
    The server has the following Application error
    Error reading data from the MS Dos Console.
    The pipe has been ended. 109 (0x6d)
    The application can successfully be launched locally outside of the shell on the server. The error is reproducable across RF devices and desktop telnet connections.
    The firewalls are off.
    Are there some additional protections in Server 2012 which would cause the pipe-based link to be stopped when launching the exe? Am I missing something? The 3rd-party telnet server is certified for Server 2012.
    Thnak you

    I'd ask in the
    Windows Server General Forum, or ask the third party vendor.
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
    My Blog: http://unlockpowershell.wordpress.com
    My Book:
    Windows PowerShell 2.0 Bible
    My E-mail: -join ("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})

  • How to read data using SQLGetData from a block, forward-only cursor (ODBC)

    Hi there.  I am trying to read data a small number of rows of data from either a Microsoft Access or Microsoft SQL Server (whichever is being used) as quickly as possible.  I have connected to the database using the ODBC API's and have run a select
    statement using a forward-only, read-only cursor.  I can use either SQLFetch or SQLExtendedFetch (with a rowset size of 1) to retrieve each successive row and then use SQLGetData to retrieve the data from each column into my local variables.  This
    all works fine.
    My goal is to see if I can improve performance incrementally by using SQLExtendedFetch with a rowset size greater than 1 (block cursor).  However, I cannot figure out how to move to the first of the rowset returned so that I can call SQLGetData to retrieve
    each column.  If I were using a cursor type that was not forward-only, I would use SQLSetPos to do this.  However, using those other cursor types are slower and the whole point of the exercise is to see how fast I can read this data.  I can
    successfully read the data using a block forward only cursor if I bind each column to an array in advance of the call to SQLExtendedFetch.  However, that has several drawbacks and is documented to be slower for small numbers of rows.  I really
    want to see what kind of speed I can achieve using a block, forward-only, read-only cursor using SQLGetData to get each column.
    Here is the test stub that I created:
    ' Create a SELECT statement to retrieve the entire collection.
    selectString = "SELECT [Year] FROM REAssessmentRolls"
    ' Create a result set using the existing read/write connection. The read/write connection is used rather than
    ' the read-only connection because it will reflect the most recent changes made to the database by this running
    ' instance of the application without having to call RefreshReadCache.
    If (clsODBCDatabase.HandleDbcError(SQLAllocStmt(gDatabase.ReadWriteDbc, selectStmt), gDatabase.ReadWriteDbc, errorBoxTitle) <> enumODBCSQLAPIResult.SQL_SUCCESS) Then
    GoTo LoadExit
    End If
    Call clsODBCDatabase.HandleStmtError(SQLSetStmtOption(selectStmt, SQL_CONCURRENCY, SQL_CONCUR_READ_ONLY), selectStmt, errorBoxTitle)
    Call clsODBCDatabase.HandleStmtError(SQLSetStmtOption(selectStmt, SQL_CURSOR_TYPE, SQL_CURSOR_FORWARD_ONLY), selectStmt, errorBoxTitle)
    Call clsODBCDatabase.HandleStmtError(SQLSetStmtOption(selectStmt, SQL_ROWSET_SIZE, MAX_ROWSET_SIZE), selectStmt, errorBoxTitle)
    If (clsODBCDatabase.HandleStmtError(SQLExecDirect(selectStmt, selectString, Len(selectString)), selectStmt, errorBoxTitle) <> enumODBCSQLAPIResult.SQL_SUCCESS) Then
    GoTo LoadExit
    End If
    ' Cursor through result set. Each time we fetch data we get a SET of rows.
    sqlResult = clsODBCDatabase.HandleStmtError(SQLExtendedFetch(selectStmt, SQL_FETCH_NEXT, 0, rowsFetched, rowStatus(0)), selectStmt, errorBoxTitle)
    Do While (sqlResult = enumODBCSQLAPIResult.SQL_SUCCESS)
    ' Read all rows in the row set
    For row = 1 To rowsFetched
    If rowStatus(row - 1) = SQL_ROW_SUCCESS Then
    sqlResult = clsODBCDatabase.HandleStmtError(SQLSetPos(selectStmt, row, SQL_POSITION, SQL_LOCK_NO_CHANGE), selectStmt, errorBoxTitle)
    Call clsODBCDatabase.SQLGetShortField(selectStmt, 1, assessmentRollYear(row - 1))
    Console.WriteLine(assessmentRollYear(row - 1).ToString)
    End If
    Next
    ' If the rowset we just retrieved contains the maximum number of rows allowed, there could be more data.
    If rowsFetched = MAX_ROWSET_SIZE Then ' there could be more data
    sqlResult = clsODBCDatabase.HandleStmtError(SQLExtendedFetch(selectStmt, SQL_FETCH_NEXT, 0, rowsFetched, rowStatus(0)), selectStmt, errorBoxTitle)
    Else
    Exit Do ' no more rowsets
    End If
    Loop ' Do While (sqlResult = enumODBCSQLAPIResult.SQL_SUCCESS)
    The test fails on the call to SQLSetPos.  The error message I get is "Invalid cursor position; no keyset defined".  I have tried passing SET_POSITION and also SET_REFRESH.  Same error.  There has to be a way to do this!
    Thank you for your help!
    Thank You! - Andy

    Hi Apelkey,
    Thank you for your question. 
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Urgent help with simple BPEL process for reading data from database

    Hello there,
    I need help with BPEL project.
    i have created a table Employee in Database.
    I did create application, BPEL project and connection to the database properly using Database Adapter.
    I need to read the records from the database and convert into xml fomat and it should to go approval for BPM worklist.
    Can someone please describe me step by step what i need to do.
    Thx,
    Dps

    I have created a table in Database with data like Empno,name,salary,comments.
    I created Database Connection in jsp page and connecting to BPEL process.
    It initiates the process and it goes automatically for approval.
    Please refer the code once which i created.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@page import="java.util.Map" %>
    <%@page import="com.oracle.bpel.client.Locator" %>
    <%@page import="com.oracle.bpel.client.NormalizedMessage" %>
    <%@page import="com.oracle.bpel.client.delivery.IDeliveryService" %>
    <%@page import="javax.naming.Context" %>
    <%@page import="java.util.Hashtable" %>
    <%@page import="java.util.HashMap" %>
    <%@ page import="java.sql.*"%>
    <%@ page import= "jspprj.DBCon"%>
    <html>
    <head>
    <title>Invoke CreditRatingService</title>
    </head>
    <body>
    <%
    DBCon dbcon=new DBCon();
    Connection conn=dbcon.createConnection();
    Statement st=null;
    PreparedStatement pstmt=null;
    Hashtable env= new Hashtable();
    ResultSet rs = null;
    Map payload =null;
    try
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.PROVIDER_URL, "opmn:ormi://localhost:port:home/orabpel");//bpel server
    env.put("java.naming.security.principal", "username");
    env.put("java.naming.security.credentials", "password");//bpel console
    Locator locator = new Locator("default","password",env);
    IDeliveryService deliveryService =
    (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
    // construct the normalized message and send to Oracle BPEL Process Manager
    NormalizedMessage nm = new NormalizedMessage();
    java.util.HashMap map = new HashMap();
    st=conn.createStatement();
    out.println("connected");
    String query1="Select * from EMPLOYEE";
    rs=st.executeQuery(query1);
    /*reading Data From Database and converting into XML format
    so that no need of going to BPEL console and entering the details.
    while (rs.next()){
    String xml1 = "<AsynchBPELProcess1ProcessRequest xmlns='http://xmlns.oracle.com/AsynchBPELProcess1'>"+
    "<Empno>"+rs.getString(1)+"</Empno>"+
    "<EmpName>"+rs.getString(2)+"</EmpName>"+
    "<Salary>"+rs.getString(3)+"</Salary>"+
    "<Comments>"+rs.getString(4)+"</Comments>"+
    "</AsynchBPELProcess1ProcessRequest>";
    out.println(xml1);
    nm.addPart("payload", xml1 );
    // EmployeeApprovalProcess is the BPEL process in which human task is implemented
    deliveryService.post("EmployeeApprovalProcess", "initiate", nm);
    // payload = res.getPayload();
    out.println( "BPELProcess CreditRatingService executed!<br>" );
    // out.println( "Credit Rating is " + payload.get("payload") );
    //Incase there is an exception while invoking the first server invoke the second server i.e lsgpas13.
    catch(Exception ee) {
    //("BPEL Server lsgpas14 invoking error.\n"+ee.toString());
    %>
    </body>
    </html>
    Its working fine.And i want it for Bulk approvals.please help me step by step procedure if any other way to implement this.

  • How to read data from success function

    Hi,
    In the success function of my POST method, I want to read a property from the data parameter. This is my code:
    success : function(data, response) {
                                    console.log(data);
                                    alert("succes");
    In the JS console:
    I'd like to read the Guid property.
    Thanks,
    RW

    Please refer to the snippet..
      var sServiceUrl = "http://services.odata.org/V2/(S(ryt5lxvehordgneie5t10xpe))/OData/OData.svc/" ;
      var oModel = new sap.ui.model.odata.ODataModel(sServiceUrl, true ) ;
      var oData = {
        "ID" : 93 ,
        "Name" : 'Test',
      "Price" : '3.3'
      var fnSUCCESS = function(mResponse) {
        debugger ;
        console.log("SUCCESS", mResponse);
      console.log('ID' + mResponse.ID);
      var fnERROR = function(mResponse) {
              console.log("ERROR", mResponse);
      oModel.create('/Products',oData,null,fnSUCCESS,fnERROR);
    Once you use JSON format, things become pretty straight forward.
    You can use mResponse.<PROPERTY NAME> to access the data.
    In your case <PROPERTY NAME> will be 'Guid'
    In short, if you are inside your success method, either you can use data.Guid  or response.data.Guid to access it the Guid property

  • Service reads data but Bpel process does not start

    i have a very simple project. I have db2(as400) adapter and it reads data, i will receive data, transfom and send to oracle database. I deployed the project successfuly but when instance start i see the service reads the data but bpel process does not start and and there is no error. At the flow chart there is only readAS400 partnerlink, there is no bpelprocess. In the partnerlink i am usin polling, i read the data's with 1 and update to 2. It reads but dont update to 2.
    In deploy step and when instance starts there is no errors. But when i am deploying i get a warning but i dont know it's related with this situation.
    (Warning: property "activationAgent.readAs400.className" may not be understood by BPEL component BPELProcessEqpType - it will likely be ignored.)
    Do you have any suggestion ? Thanks in advance.

    check the recovery console, the bpel process possibly is going into manual recovery,
    Another thing you might wanna try is using checkpoints in your process..
    also, instead of getting the db adapter to instantiate the process, try a simpler process just to see if the db adapter is working or not..
    A normal process, which you manually instantiate from em console, with the db adapter in it after the recevie activity
    Edited by: AshishSharma on Jun 24, 2010 5:48 PM

  • Sandboxd deny file-read-data to storeuid, appleeventsd, iconservicesagen... WHY?

    In my console on the latest Yosemite, I get tons of spam from sandboxd where it is deny file-read-data from Apple's own processes: storeuid, appleeventsd, iconservicesagen, etc. Then there is deny file-issue-extension to com.apple.Safari.SearchHelper. What the heck is going on? Why is sandboxd denying Apple's own processes in the system? This computer is running so much slower than it should. Card readers don't even work with it anymore. We just put in a brand new hard drive and freshly upgraded to Yosemite.
    Then there are all these BUG in process suhelperd: over-released legacy external boost assertions (1 total, 1 external, 0 legacy-external). About 100 of those appear. Then mdworker says:
    code validation failed in the process of getting signing information: Error Domain=NSOSStatusErrorDomain Code=-67062 "The operation couldn't be completed. (OSStatus error -67062.)"
    Can someone please make sense out of all this? How do I get these bugs, errors, and crap to STOP?

    I feel your pain. I too have posted with a zillion errors in the log. Safari/Yosemite is now a complete and utter mess.
    Screen shot of things going south with Apple.
    I really thought I would never look at MS Windows again, but this is begging to prove me wrong. My MBP is now unusable. Tks Apple

  • Failed to read data from report file, failed to read parameter object

    Error message when doing a u201CSchedule List of Valuesu201D
    failed to read data from report file,
    c:\docume~1\user........
    failed to read parameter object
    Earlier in the day it worked just fine nothing had been changed.
    I have admin right on the windows server and in central management console
    Can someone please help with this issue.

    Hi Glenn
    Please let us know the following:
    1.What is the exact version of Crystal Reports Designer?
    2.What is the version of Business objects Enterprise installed on the machine?
    3.Are reports based on Business views,Deski,Webi?
    4.Are the reports migrated from older version of Crystal Reports to new Version?
    Thanks
    Shraddha

  • Regarding how to Read data when it is in offline in SMP 3.0

    I have a big problem guyz...I am working on a hybrid Mobile App
    When I am in Online I am able to read the data.When I kill the application and relaunch the app and place the App in Airplane mode and when I try to read the data It is throwing me a error in browser stating  "ERR_CONN_RESET" and in the device I am getting an error such as HTTPREQUESTFAILED....
    Mithun Please help us in reading the data in offline Mode.Please help us it is on high priority
    Tags edited by: Jitendra Kansal (Moderator)

    Yeah for sure mithun,
    function read() {
      if(navigator.onLine){
      alert("hi");
            updateStatus2("read request started");
            startTime = new Date();
            clearTable();
            if (!haveAppId()) {
                return;
            var sURL = applicationContext.applicationEndpointURL + "/DateFormats";
      console.log("Date Formats Fetched"+  sURL);
            var oHeaders = {};
            oHeaders['Authorization'] = authStr;
      oHeaders['X-SMP-APPCID'] = applicationContext.applicationConnectionId;    //this header is provided by the logon plugin
      oHeaders['Content-Type'] = "application/xml";
            oHeaders['X-CSRF-Token'] = "FETCH";
            var request = {
                headers : oHeaders,
                requestUri : sURL,
                method : "GET"
            console.log("read using " + sURL);
            OData.read(request, readSuccessCallback, errorCallback);
      else{
      sap.OData.applyHttpClient();
      //OData.read(request,readSuccessCallback,errorCallback);
        function readSuccessCallback(data, response) {
            var endTime = new Date();
            var duration = (endTime - startTime)/1000;
            updateStatus2("Read " + data.results.length + " records in " + duration + " seconds");
            var productsTable = document.getElementById("ProductsTable");
            for (var i = 0; i < data.results.length; i++) {
                var row = productsTable.insertRow(1);
                var cell1 = row.insertCell(0);
                var cell2 = row.insertCell(1);
                cell1.innerHTML = data.results[i].DateFormatType;
                cell2.innerHTML = data.results[i].DateFormatValue;
    the above is my read() function in which the data is read.
    I am also attaching my openStore() method:
    if (!haveAppId()) {
                return;
            startTime = new Date();
            updateStatus2("store.open called");
            var properties = {
                "name": "DateFormatsOfflineStore",
                "host": applicationContext.registrationContext.serverHost,
                "port": applicationContext.registrationContext.serverPort,
                "https": applicationContext.registrationContext.https,
                "serviceRoot" :  appId,
      "streamParams" : "custom_header=Authorization:Basic " + btoa(applicationContext.registrationContext.user + ":" + applicationContext.registrationContext.password) + ";custom_header=X-SMP-APPCID:" +  applicationContext.applicationConnectionId + ";",
                "definingRequests" : {
                    "DateFormats" : "/DateFormats"
            store = sap.OData.createOfflineStore(properties);
      console.log("Offline Store Created");
            //var options = {};
            store.open(openStoreSuccessCallback, errorCallback/*, options*/);
      console.log("Offline Store Opened");
    When the device is in online , data is read absolutely fine where as in offline i am unable to read data and Http request failed error is getting displayed.....
    Mithun Please help us in this on high priority

  • JavaConsole Error: Problem reading data from server

    HI All
    We are getting this error on java console on a page:
      Error: Problem reading data from Server - Java.Security.AccessControlException:access denied (java.util.PropertyPermission http.strictpostredirect Read)
    In this page we are not firing  a SQL Query of huge data.
    Any suggestions on this why it is happening?
    Thanks
    Manisha

    Manisha,
    I think JVM(Java Virtual Machine) is trying to access something at network level and it cant able to find it.Or any new patches of java is installed.
    Or may be due to IIS or Applet,Don't know exactly.
    You can find some answers in below links:
    http://java.sun.com/j2se/1.4.2/docs/api/java/security/AccessControlException.html
    http://www.webdeveloper.com/forum/archive/index.php/t-46358.html
    -Suresh

  • View Object to read data from a java file

    Hi,
    I am using JDeveloper 11.1.1.4 and ADF-BC in my application.
    For one of my view objects , I want the data to be read from a java file which exposes some method to return a collection.
    I cannot use a static view object in this case.
    Please suggest the best way to implement this requirement.Basically build a view object that should read data from a java file.
    Thanks,
    Praveen

    Depending on your use case you can either use a programmatic VO or directly expose the JV class as a data control.
    http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_36/jdtut_11r2_36.html

  • Read data from SAP R/3 Class-System

    Hello,
    first of all sorry when I posted this into the wrong subforum, but I wasn't sure about that. My Question is how to read data from the Classystem I have specified in my ABAP report.
    The goal is to read data from my individual class-system as well as data from MM and write them to a table that is to be read by another report. But right now I can't find information about the class system and abap. Maybe you know some tutorials or blogs about right that topic you can suggest?

    What class system have you specified in your report?
    Normally a class can be used by declaring a variable of type of the class in question, if this class can be instantiated this is. If your class can't be instantiated, but it has only class methods, you can call this method directly.
    But there is a lot more to this ABAP Object Oriented Programming, than just this short explanation. Search on SDN for some ABAP OO Tutorials.
    some links:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c3/225b5654f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b6cae890-0201-0010-ef8b-f970a9c41d47
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1591ec90-0201-0010-3ba8-cdcd500b17cf
    Transacation ABAPDOCU.

  • Can not read data from URL!

    Hello,
    I want to read data from URL (http://84.100.130.82:8000/;stream.nsv). But can not do it. Because when try to call function openDataInputStream() shows this error: java.io.IOException: response does not start with HTTP it starts with: ICY. How I can fix this bug?
    HttpConnection c = null;
    InputStream is = null;
    OutputStream os = null;
    StringBuffer b = new StringBuffer();
    String           response,
    responseLitle;
    c = (HttpConnection)Connector.open(&#8220;http://84.100.130.82:8000/;stream.nsv&#8221;);
    os = c.openOutputStream();
    os.flush();
    is = c.openDataInputStream();     // ERROR CODE HERE
    int ch;
    // receive output
    while ((ch = is.read()) != -1)
    b.append((char) ch);
    response = b.toString();Regards, Ramunas

    Hi, I�m trying to do the same as above, get MP3 from a Shoutcast server.
    I got the same fault ("response does not start with HTTP it starts with: ICY") when I tried to open an HttpConnection as bellow:
    ============================================
    HttpConnection conn = (HttpConnection) Connector.open("http://64.236.34.196/stream/1074");
    Then I tried to open a socket connection as bellow:
    ======================================
    SocketConnection conn = (SocketConnection) Connector.open("socket://64.236.34.196:80");
    String get = "GET /stream/1074 HTTP/1.1";
    DataOutputStream os = conn.openDataOutputStream();
    os.writeUTF(get);
    InputStream is = conn.openInputStream();
    But then I got the following error:
    =========================
    java.lang.SecurityException: Target port denied to untrusted applications
    Could someone help me to find out what is going on?
    Thanks a lot!

  • Read data from excel sheet and then perform the required operations.

    Hi all
    I need to write a procedure which can read data from excel sheet.I have excel sheet in which i have to options one is modification and other is addition.so if it reads modification then i need to read the concerned table name then check its availability in pl-sql datbase.If table exists then reading the realated column in that row to fire the querry. The excel sheet is saved in local disk c.
    can anybody help me with this.How i need to start specialy to read the data from excel sheet saved in local disk c.
    Edited by: user13334062 on Jun 30, 2010 3:45 AM

    Hi
    If you can convert the excel to a csv format, then it can be simply query from DB Creating Oracle External Tables. Best part is that you may still change the CSV using EXCEL.
    Following action Points can be adopt;
    *1. Convert Excel File to a csv. File Save as CSV*
    *2. Create Oracle Directory* ( This has to be the location of your excel file )
    SQL> Create directory mydir as 'C:\testdb'; --- "testdb" is the location folder in win for your excel sheet.
    *3. Create the External Table*
    SQL> create table my_ext_tab (
    Field1 Datatype,
    Field2 Datatype,
    Field3 Datatype,
    Field4 Datatype,
    Field5 Datatype
    Organization external
    (type oracle_loader default directory mydir
    access parameters (records delimited by newline fields terminated by ',')
    location ('my_ext_tab.csv'))
    reject limit 100;
    *4. Now you can query the table "my_ext_tab"*
    Select * from "my_ext_tab";
    Please avoid the reformat the data column inside the spreadsheet (CSV).

  • Error reading data from CLOB column into VARCHAR2 variable

    Hi all,
    Am hitting an issue retrieving data > 8K (minus 1) stored in a CLOB column into a VARCHAR2 variable in PL/SQL...
    The "problem to be solved" here is storing DDL, in this case a "CREATE VIEW" statement, that is longer than 8K for later retrieval (and execution) using dynamic SQL. Given that the EXECUTE IMMEDIATE statement can take a VARCHAR2 variable (up to 32K(-1)), this should suffice for our needs, however, it seems that somewhere in the process of converting this VARCHAR2 text to a CLOB for storage, and then retrieving the CLOB and attempting to put it back into a VARCHAR2 variable, it is throwing a standard ORA-06502 exception ("PL/SQL: numeric or value error"). Consider the following code:
    set serveroutput on
    drop table test1;
    create table test1(col1 CLOB);
    declare
    cursor c1 is select col1 from test1;
    myvar VARCHAR2(32000);
    begin
    myvar := '';
    for i in 1..8192 loop
    myvar := myvar || 'a';
    end loop;
    INSERT INTO test1 (col1) VALUES (myvar);
    for arec in c1 loop
    begin
    myvar := arec.col1;
    dbms_output.put_line('Read data of length ' || length(myvar));
    exception when others then
    dbms_output.put_line('Error reading data: ' || sqlerrm);
    end;
    end loop;
    end;
    If you change the loop upper bound to 8191, all works fine. I'm guessing this might have something to do with the database character set -- we've recently converted our databases over to UTF-8, for Internationalizion support, and that seems to have changed underlying assumptions regarding character processing...?
    As far as the dynamic SQL issue goes, we can probably use the DBMS_SQL interface instead, with it's EXECUTE procedure that takes a PL/SQL array of varchar2(32K) - the only issue there is reading the data from the CLOB column, and then breaking that data into an array but that doesn't seem insurmountable. But this same basic issue (when a 9K text block, let's say, turns into a >32K block after being CLOBberred) seems to comes up in other text-processing situations also, so any ideas for how to resolve would be much appreciated.
    Thanks for any tips/hints/ideas...
    Jim

    For those curious about this, here's the word from Oracle support (courtesy of Metalinks):
    RESEARCH
    ========
    Test the issue for different DB version and different characterset.
    --Testing the following PL/SQL blocks by using direct assignment method(myvar := arec.col1;) on
    different database version and different characterset.
    SQL>create table test1(col1 CLOB);
    --Inserting four CLOB data into test1.
    declare
    myvar VARCHAR2(32767);
    begin
    myvar := RPAD('a',4000);
    INSERT INTO test1 (col1) VALUES (myvar);
    myvar := RPAD('a',8191);
    INSERT INTO test1 (col1) VALUES (myvar);
    myvar := RPAD('b',8192);
    INSERT INTO test1 (col1) VALUES (myvar);
    myvar := RPAD('c',32767);
    INSERT INTO test1 (col1) VALUES (myvar);
    commit;
    end;
    --Testing the direct assignment method.
    declare
    cursor c1 is select col1, length(col1) len1 from test1;
    myvar VARCHAR2(32767);
    begin
    for arec in c1 loop
    myvar := arec.col1;
    --DBMS_LOB.READ(arec.col1, arec.len1, 1, myvar);
    dbms_output.put_line('Read data of length: ' || length(myvar));
    end loop;
    end;
    The following are the summary of the test results:
    ===================================
    1. If the database characterset is WE8ISO8859P1, then the above direct assignment
    method(myvar := arec.col1;) works for database version 9i/10g/11g without any
    errors.
    2. If the database characterset is UTF8 or AL32UTF8, then the above direct assignment method(myvar := arec.col1;) will generate the "ORA-06502:
    PL/SQL: numeric or value error" when the length of the CLOB data is greater
    than 8191(=8K-1). The same error can be reproduced across all database versions
    9i/10g/11g.
    3. Using DBMS_LOB.READ(arec.col1, arec.len1, 1, myvar) method to read CLOB data into a VARCHAR2 variable works for both WE8ISO8859P1 and UTF8
    characterset and for all database versions.
    So - it seems as I'd surmised, UTF8 changes the way VARCHAR2 and CLOB data is handled. Not too surprising, I suppose - may you all be lucky enough to be able to stay away from this sort of issue. But - the DBMS_LOB.READ workaround is certainly sufficient for the text processing situations we find ourselves in currently.
    Cheers,
    Jim C.

Maybe you are looking for

  • Removing keywords from keyword list in iPhoto

    I am trying to reduce/consolidate all my keywords but don't know how to find the actual list of my keywords.  The only "list" that shows up is the one that appears when I'm in the search field and click on "keyword".  The reason I want to do this is

  • Code please(select statements)

    Can somebody please help me out in writing an ABAP program for the following requirement? Use "select" statement in your ABAP program to select the database table contents depending upon the query that user has entered at the selection screen. Displa

  • System exception after a succesful synchronous ABAP Proxy call

    Guys, I have the following scenario: 1) From an R/3 box I initiate a synchronous ABAP proxy call 2) On XI everything works fine, the http request is sent out (using the http adapter), the response comes back succesfully and it is transfered back to t

  • Captivate 6 error at end of install

    I’ve just gotten the following error after running Captivate_6_x64_LS12.exe. Not sure what it means or how I should proceed. Will paste in the contents of the error summary below. Any suggestions? Exit Code: 6 Please see specific errors and warnings

  • How do I sign out of Messages on Mountain Lion - HELP :)

    I want to add or use another apple id that will use messages. Im fairly new to make and can't figure this one out.  Thanks for helping!