Error in dbms_output.put_line()

Heloo ..........
I have one procedure with 4 dbms_output.put_line() statement.
DBMS_OUTPUT.PUT_LINE(SUBSTR(str,0,200));
DBMS_OUTPUT.PUT_LINE(SUBSTR(str,201,400));
DBMS_OUTPUT.PUT_LINE(SUBSTR(str,401,600));
DBMS_OUTPUT.PUT_LINE(SUBSTR(str,601,800));
Now when I excute this procedure by commenting this 4 statement procedure runs ok, BUt it give error when i uncomment this 4 statement.
I want to display sql text for dubuging........but i cant get it.
any sollution of this........I had run SET SERVEROUTPUT ON SIZE 10000.But i still get errors of "Host Bind Array too small"

Is this runs for you?If not what error?
SQL> create or replace procedure proc1
  2  as
  3    str varchar2(4000) := 'Now when I excute this
procedure by commenting this 4 statement procedure runs ok, BUt it give error  when i uncomment this 4
statement.I want to display sql text for
dubuging........but i cant get it.any sollution of
this........I had run SET SERVEROUTPUT ON SIZE 10000';
  4   begin
  5    DBMS_OUTPUT.PUT_LINE(SUBSTR(str,0,200));
  6    DBMS_OUTPUT.PUT_LINE(SUBSTR(str,201,400));
  7    DBMS_OUTPUT.PUT_LINE(SUBSTR(str,401,600));
  8    DBMS_OUTPUT.PUT_LINE(SUBSTR(str,601,800));
  9  end;
10  /
Procedure created.
SQL> set serveroutput on
SQL> exec proc1;
Now when I excute this procedure by commenting this 4 statement procedure runs 
ok, BUt it give error  when i uncomment this 4 statement.I want to display sql 
text for dubuging........but i cant get it                                     
.any sollution of this........I had run SET SERVEROUTPUT ON SIZE 10000         
PL/SQL procedure successfully completed.
Message was edited by:
        jeneesh
formatted                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • DBMS_OUTPUT.PUT_LINE  Error....

    The out put of DBMS_OUTPUT.PUT_LINE is not showing in SQL Developer.............
    plz help me to solve this,.......

    ya, its empty..

  • How to Populate a table with DBMS_OUTPUT.put_line

    Hey Guys, it's Xev.
    Please only pleasant people reply to this.
    I have a PL/SQL Program that searches for strings and then at the end of it it prints out to DBMS_OUTPUT.put_line.
    I have the owner, the table_name, the column name and the count, then it goes to DBMS_OUTPUT.put_line
    What i want to do, is take the results of DBMS_OUTPUT.put_line and insert it into a table.
    Here is the script I am talking about, as you can see it's simple, yet for me it works.  I want to take the results of this and insert it into a table. How can i do  that??
    set serveroutput on size unlimited
    execute DBMS_OUTPUT.ENABLE (buffer_size => NULL);
    DECLARE
       FND_GOVIDS       INTEGER;
       BEGIN
    FOR t  IN (SELECT owner, table_name, column_name
                FROM all_tab_columns
                WHERE owner = upper('&SCHEMA_NAME'))
    LOOP
      BEGIN
        EXECUTE IMMEDIATE 'with a as ( select  case when REGEXP_LIKE(' || t.column_name ||
    --This searches for 8 Alpha Digits
    ',''^([[:alpha:]]{2}|[[:alpha:]]{4})?[ ]?[0-9]{8}[ ]?([[:alpha:]]{2}|[[:alpha:]]{4})?$'')
    then ''Match Found''
    else ''No Match Found'' end as output from ' || t.owner || '.' || t.table_name || ')
    select count(*) from a where a.output=''Match Found'' '
          INTO FND_GOVIDS ;
    IF FND_GOVIDS > 0         THEN
    DBMS_OUTPUT.put_line (
    t.owner
    || '.'
    || t.table_name
    || ' '
    || t.column_name
    || ' '
    || FND_GOVIDS);
      END IF;
      EXCEPTION
        WHEN OTHERS
          THEN
          DBMS_OUTPUT.put_line (
          'Generic Error '
          || t.column_name
          || ' from '
          || t.owner
          || '.'
          || t.table_name);      
          END;
       END LOOP;
    END;

    Nope, the table is empty....
    But it ran without error??!?! Wait a minute, I think i have to commit right? Since it's not straight sql, ok, that's what I am going to try..
    set serveroutput on size unlimited
    execute DBMS_OUTPUT.ENABLE (buffer_size => NULL);
    DECLARE
       FND_GOVIDS       INTEGER;
       BEGIN
    FOR t  IN (SELECT owner, table_name, column_name
                FROM all_tab_columns
                WHERE owner = upper('&SCHEMA_NAME'))
    LOOP
      BEGIN
        EXECUTE IMMEDIATE 'with a as ( select  case when REGEXP_LIKE(' || t.column_name ||
    --This searches for 6 Alpha Digits
    ',''^([[:alpha:]]|[[:alpha:]]{3})[0-9]{6}$'')
    then ''Match Found''
    else ''No Match Found'' end as output from ' || t.owner || '.' || t.table_name || ')
    select count(*) from a where a.output=''Match Found'' '
          INTO FND_GOVIDS ;
    /*Table insert for resulting */
    IF FND_GOVIDS > 0 THEN
    INSERT INTO "SMEG"."DYNAMIC_COUNTS" (T_OWNER, T_TABLE_NAME, T_COLUMN_NAME, FND_GOVIDS) VALUES
    ('t.owner','t.table_name','t.column_name','FND_GOVIDS');
      END IF;
    /* dbms_output */
    IF FND_GOVIDS > 0 THEN
    DBMS_OUTPUT.put_line (t.owner || '.' || t.table_name || ' ' || t.column_name || ' ' || FND_GOVIDS);
      END IF;
    /* Exception Handeling */
      EXCEPTION
        WHEN OTHERS
          THEN
          DBMS_OUTPUT.put_line (
          'Generic Error '
          || t.column_name
          || ' from '
          || t.owner
          || '.'
          || t.table_name);     
          END;
       END LOOP;
    END;

  • How to print extract value in dbms_output.put_line

    CREATE OR REPLACE PROCEDURE pr_srch_data
    AS
    xml_data_val xmltype:=null;
    vPropertyName clob;
    vstr varchar2(1000);
    operation varchar2(1000);
    vQuery VARCHAR2(4000):=NULL;
    vQry VARCHAR2(4000):=NULL;
    vPartyid VARCHAR2(2000):=NULL;
    vPerson varchar2(4000);
    BEGIN
    FOR I IN (SELECT EAPP_XML_DATA
    FROM binary_xml
    WHERE extractvalue(eapp_xml_data,'/OLifE/Party[@id="Party1"]/Person/LastName') Like 'Rajesh%'
    LOOP
    BEGIN
         SELECT extractvalue(value(t),'/Relation/@RelatedObjectID')
         INTO vPartyid
         FROM TABLE (XMLSEQUENCE (EXTRACT (xml_data_val,'/OLifE/Relation'))) t
         WHERE extractvalue(value(t),'/Relation/RelationRoleCode')='Owner'
    AND existsnode(value(t),'/Relation/@RelatedObjectID')=1 ;
    END;
    SELECT extract(value(t),'/OLifE/Party[@id='''||vPartyid ||''']/Person')
    INTO vPerson
    FROM TABLE (XMLSEQUENCE (EXTRACT (I.EAPP_XML_DATA,'/OLifE')))t;
    dbms_output.put_line('vPerson'||'--'||vPerson);
    END LOOP;
    END;
    But when i am printing vPerson i am getting error. I need to print that extract value.

    Things to remember (that you should know by now)
    Please remind us of which version of 11g you are using in this post and all future posts.
    Look at the FAQ under your sign-in name to see how to use the tag to retain formatting of your code as you have seen our examples to you look like.
    We can't see your screen or your data so how about the error message and some data from your table?
    Please start using either XMLTable or XMLCast/XMLQuery as odie_63 as shown you.
    What are you trying to do?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Dbms_output.put_line does not write to stdout

    I expect the following code to fail and to write 'ERRORE' to stdout:
    ------------------- mm.sql
    set serveroutput on
    BEGIN
    select 1/0 from dual;
    exception
    when others then
    dbms_output.put_line('ERRORE');
    END;
    I execute this from the command line
    sqlplus rmsas_test/rmsas_test < mm.sql > mm.log 2>&1
    It produces
    ---------------------------- mm.log
    SQL*Plus: Release 9.2.0.6.0 - Production on Gio Lug 13 16:42:27 2006
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    JServer Release 9.2.0.6.0 - Production
    SQL> SQL> 2 3 4 5 6 7 Disconnected from Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    JServer Release 9.2.0.6.0 - Production
    But no 'ERRORE' has been written to stdout????
    Why?
    Thanks
    Mauro

    Just a comment. There are no STDOUT or STDERR devices when dealing with PL/SQL programs.
    The code runs inside an Oracle server process. That process itself is detached from any display device, any input device (e.g. mouse or keyboard) and any peripheral device (e.g. printer).
    DBMS_OUTPUT is simply a persistant PL/SQL buffer that can be created in an Oracle session. The contents of this buffer can be displayed by a client (using the DBMS_OUTPUT API to read and clear the buffer). Do not confuse it with a proper STDOUT/STDERR device.

  • Dbms_output.put_line not displaying anything

    I am running the below code (ssn_run.sql) using sqlplus 10.2.0.1.0 on my windows XP professional client PC.
    The database is a Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit running on Solaris
    I cracked my head for about one hour but couldn't figure out this :
    accept input_ssn prompt 'Enter SSN :'
    set feedback on
    set serveroutput on
    set echo on
    set term on
    set heading on
    set pagesize 0
    set linesize 10000
    set verify on
    undefne sdate input_ssn
    col sdate new_value sdate
    col input_ssn new_value input_ssn
    select to_char(sysdate,'YYYYMMDD') sdate from dual;
    spool C:\PERSON_DATA_&&sdate._&&input_ssn..TXT
    select 'REPORT GENERATED ON : '||SYSDATE FROM DUAL;
    begin
    select personid into v_personid from person where SIN = '&&input_ssn';
    INSERT INTO PERSON_OLD
    (PERSONID, TITLE, FNAME, MNAME, LNAME, ACFM, SIN, UNAME, AKANAME, DCFM,
    IROWID, SUFFIX, PTYPE, OLD_SSN)
    SELECT PERSONID, TITLE, FNAME, MNAME, LNAME, ACFM, SIN, UNAME,
    AKANAME, SIN FROM PERSON WHERE SIN = '&&input_ssn';
    INSERT INTO MEMBER_OLD
    (CLNT, MKEY, PERSONID, MEMNO, OLD_MEMNO)
    SELECT CLNT, MKEY, PERSONID, MEMNO,MEMNO
    FROM MEMBER WHERE PERSONID IN(SELECT PERSONID FROM PERSON WHERE SIN = '&&input_ssn');
    UPDATE PERSON SET FNAME = TRANSLATE(SIN,'0123456789','ACEGIKMOQS'),
    LNAME = TRANSLATE(SIN,'0123456789','SQOMKIGECA'),
    UNAME = TRANSLATE(SIN,'0123456789','ACEGIKMOQS')||' '||TRANSLATE(SIN,'0123456789','SQOMKIGECA'),
    AKANAME=NULL WHERE SIN = '&&input_ssn';
    UPDATE MEMBER SET MEMNO = MKEY WHERE PERSONID IN(SELECT PERSONID FROM PERSON WHERE SIN = '&&input_ssn');
    for i in(select personid person_other from person_relation where relpersonid in(select personid from
    person where PERSONID = v_personid))
    loop
    dbms_output.put_line('i.person_other is : '||i.person_other);
    UPDATE MEMBER SET MEMNO = MKEY WHERE PERSONID = i.person_other;
    end loop;
    EXCEPTION
    WHEN OTHERS THEN
         ecode := SQLCODE;
         emesg := SQLERRM;
         dbms_output.put_line('Error while data scrubbing: Error code is : ' || ' - ' || ecode);
         dbms_output.put_line('Error message is :' || ' - ' || emesg);
    end;
    spool off;
    set term on
    set feedback on
    set HEADING on
    set verify on
    --End of code
    The SELECT statement that comes in the for loop should return data as v_personid has a value. (I tested this by a select statement)
    However, I am just not able to display the line which comes in the inner loop :
    dbms_output.put_line('i.person_other is : '||i.person_other);
    The result of this dbms output put_line neither shows up on the screen, nor it gets written to the spool file...I am stumped with this...
    The other dbms_output put_lines that display error displays okay, but not the one in the inner loop.... Can someone help me out if you see any obvious issues here........
    Also my UPDATE MEMBER statement inside the for loop doesn't do anything whereas it was supposed to update a row !!
    Thanks

    You could display the number the query return by adding;
    v_count number;After you assign v_personid;
    dbms_output.put_line('v_personid  is : '||v_personid );
    (select count(*)
    into v_count
    from person_relation
    where relpersonid in(
       select personid
       from person
       where PERSONID = v_personid)).
    dbms_output.put_line('v_count  is : '||v_count );

  • Dbms_output.put_line not working

    Hi, i am trying to use dbms_output.put_line to execute a sql in a bat script on windows...i get no errors , but the "alter tablespace" just prints but does not execute.
    What exactly am i missing? Part of the script shown below..
    thanks
    set HFILE=%SCRIPT_HOME%\remove_bkupmode.sql
    echo connect sys/%INTPWD% as sysdba >>%HFILE%
    echo set termout off heading off feedback off >>%HFILE%
    echo set linesize 300 pagesize 0 >>%HFILE%
    echo set serveroutput on size 1000000 >>%HFILE%
    echo spool %SCRIPT_HOME%\cleanup.sql >>%HFILE%
    echo Declare >>%HFILE%
    echo cursor c1 is SELECT t.name FROM V$DATAFILE d, V$TABLESPACE t, V$BACKUP b WHERE d.TS#=t.TS# AND b.FILE#=d.FILE# AND b.STATUS='ACTIVE'; >>%HFILE%
    echo Begin >>%HFILE%
    echo for tbs in c1 loop >>%HFILE%
    echo   dbms_output.put_line(' alter tablespace '^|^|tbs.name ^|^|' end backup;');  >>%HFILE%
    echo end loop; >>%HFILE%
    echo dbms_output.put_line('exit;'); >>%HFILE%
    echo End; >>%HFILE%
    echo / >>%HFILE%
    echo spool off >>%HFILE%
    echo exit; >>%HFILE%
    START /wait SQLPLUS /NOLOG @%HFILE%

    thanks guys...did i bring back memories?
    yeah its an old script. part of an old hot backup script i inherited, for a 24/7 live 9.2.0.1 database that can't be upgraded due to customizations lol
    i setup rman, but since i'n still new to rman, i wanted to continue with the user- managed hot backups
    this script will run afer the backup, just in case, to ensure that no tablespaces are left in backup mode.
    J

  • DBMS_OUTPUT.PUT_LINE not working in Stored Functions

    Hi All,
    I have one doubt, why is dbms_output.put_line not supported in Stored Functions?
    create or replace function func_in_sql(var number) return varchar2
    is
    begin
    If var is not null then
    return to_char(dbms_output.put_line(var));
    else
    return to_char(dbms_output.put_line('null'));
    end if;
    end;
    Returns error -
    LINE/COL ERROR
    5/3 PL/SQL: Statement ignored
    5/18 PLS-00222: no function with name 'PUT_LINE' exists in this scope
    7/3 PL/SQL: Statement ignored
    7/18 PLS-00222: no function with name 'PUT_LINE' exists in this scope
    Any idea why this is happening?
    I know that to print value one can just use return statement and value will be printed in SQL Prompt.
    But what makes me think is why error for PUT_LINE method?
    If error is not thrown at DBMS_OTUPUT then doesnt that mean all methods of DBMS_OUTPUT should be accessible in a function.
    Thanks in advance!
    Av.

    Hi,
    For cant call proc inside func, or in-line thing you mentioned, just tried following -
    Here is our previous Func -
    create or replace function func_in_sql(var number) return varchar2
    is
    begin
    /*If var is not null then
    return to_char(dbms_output.put_line(var));
    else
    return to_char(dbms_output.put_line('null'));
    end if;
    exception_test;
    return 'a';
    end;
    and here is our proc -
    procedure exception_test
    as
    v_count1 number;
    v_count2 number;
    begin
    select count(test_id)
    INTO V_COUNT1
    from TEST_TABLE;
    If SQL%NOTFOUND Then
    dbms_output.put_line('notfound');
    End If;
    dbms_output.put_line(v_count1);
    exception
    when no_data_found then
    If SQL%NOTFOUND Then
    dbms_output.put_line('notfound');
    End If;
    dbms_output.put_line('no_data');
    WHEN TOO_MANY_ROWS THEN
    dbms_output.put_line('too many rows');
    when others then
    dbms_output.put_line('others');
    end;
    and here is the call to func -
    SQL> select func_in_sql(x) from t1;
    FUNC_IN_SQL(X)
    a
    a
    a
    a
    4 rows selected.
    So this shows it works.
    Is this what you said? or Am I getting you wrong?
    Thanks!
    Av.

  • Buffer overflow in dbms_output.put_line

    If I code like this, an error happens. Do you know how can I
    resolve this problem?
    for i in 1..500
    loop
    dbms_output.put_line('Hello World');
    end loop;
    ORA-20000: ORU-10027: buffer overflow, limit of 2000 bytes
    Thx

    If you are running the PL/SQL block within SQL*Plus, use the SIZE
    option to the SET SERVEROUTPUT command:
    set serveroutput on size 7000
    show serveroutput
    begin
    for i in 1..500
    loop
    dbms_output.put_line('Hello World');
    end loop;
    end;
    -- CJ

  • Enhancement possiblity in dbms_output.put_line..!

    hey,
    I am having a strange client requirement.
    I am using dbms_output.put_line for output.But I was getting buffer flow error.
    Then i used utl_file to write log into a file but when due to some permission problem for FTP log file from unix directory to computer I can't use utl_file.
    Is there any possibility in dbms_output that if buffer flow error raise then
    2nd log file generate with new name and remaining log data written in new log file.
    My code in generally is below..
    SET BUFFER 1000000
    SET SERVEROUTPUT ON
    spool LMG_DBmigration_CP_DATA_Log.log
    Declare
    begin
    stmnts for DBMS_OUTPUT.PUT_LINE;
    stmnts for DBMS_OUTPUT.PUT_LINE;
    stmnts for DBMS_OUTPUT.PUT_LINE;
    stmnts for DBMS_OUTPUT.PUT_LINE;
    end;
    spool off
    exit;
    any idea ...?
    rgds,
    pc

    hey Saubhik,thanks for your answer.
    In my code,SET BUFFER 1000000 in 1st line.
    Is there any impact of this line on log buffering error?
    I am running my code via batch file..
    SET BUFFER 1000000
    SET SERVEROUTPUT ON
    spool LMG_Log.log
    Declare
    begin
    stmnts for DBMS_OUTPUT.PUT_LINE;
    stmnts for DBMS_OUTPUT.PUT_LINE;
    stmnts for DBMS_OUTPUT.PUT_LINE;
    stmnts for DBMS_OUTPUT.PUT_LINE;
    end;
    spool off
    exit;

  • Problem in dbms_output.put_line boolean variable

    hello guys m practicing PL/SQL when i try to exicute below code i get following error:
    DECLARE
    I BOOLEAN:=TRUE;
    BEGIN
    dbms_output.put_line(i);
    END;
    error:
    Error starting at line 1 in command:
    DECLARE
    I BOOLEAN:=TRUE;
    BEGIN
    dbms_output.put_line(i);
    END;
    Error report:
    ORA-06550: line 4, column 1:
    PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'
    ORA-06550: line 4, column 1:
    PL/SQL: Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    user13355933 wrote:
    hello guys m practicing PL/SQL when i try to exicute below code i get following error:
    DECLARE
    I BOOLEAN:=TRUE;
    BEGIN
    dbms_output.put_line(i);
    END;
    error:
    Error starting at line 1 in command:
    DECLARE
    I BOOLEAN:=TRUE;
    BEGIN
    dbms_output.put_line(i);
    END;
    Error report:
    ORA-06550: line 4, column 1:
    PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'
    ORA-06550: line 4, column 1:
    PL/SQL: Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:DBMS_OUTPUT.PUT_LINE only accepts strings (VARCHAR2) datatype
    what exactly do you expect to see, if in fact it worked as desired?

  • Getting text from DBMS_OUTPUT.PUT_LINE to OCI application

    Hi.
    Does anyone know of a way to get data written by DBMS_OUTPUT.PUT_LINE into a C OCI application?
    Thanks,
    bLanark

    Hi Mark,
    Could you please let me know how to declare the respective bind variables in c.
    I declared them as char ** and int. but I am getting an error.
    Please post a oci example for dbms_output.get_lines(), If you already have one.
    Thanks
    Ravi

  • DBMS_OUTPUT.put_line  buffer overflow

    Hi all
    I am taking some values into a cursor and updating a table with those values, and catching the exception in the exception block
    EXCEPTION
    WHEN OTHERS
    THEN
    sqlm := SUBSTR (SQLERRM, 1, 100);
    sqlc := SQLCODE;
    DBMS_OUTPUT.put_line ( 'Error Code : '
    || sqlc
    || ' Error Message : '
    || sqlm
    || ' : aaa:: '
    || aaa_rec.recid
    Here the problem is the data which i am updating its huge(5 million records), i am getting the error for the exception block as Buffer overflow( After I set it to the buffer value to maximum i.e 1000000), how can i avoid this problem, i am not supposed to use utl file package, Can u be a little brief in ur answers
    Thnks in advance

    1000000 is not the maximum size:
    http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_output.htm#CIHEGBBF
    There used to be a maximum setting of 1000000 (in practice nearer 600K) in earlier versions of Oracle. Perhaps you are using one of those and forgot to mention it?
    In any case, why are you using a debugging tool for error handling?

  • Dbms_output.put_line problem..

    We have created delete script to some 150 tables using cursors suppose we r deleting with some condition and use to display the output as
    dbms_output.put_line('Rows Deleted in the table distb_store_promo is '||SQL%ROWCOUNT);
    its shows error like it exceeds the limit.so we made setserver output off and running the query it works fine.is any other solution to overcome this..

    > is any other solution to overcome this..
    Yes. Do not use DBMS_OUTPUT. It is a very primitive API - useful for the odd debug display when debugging PL/SQL code. It should not be used for anything else. In fact, any DBMS_OUTPUT code in production PL/SQL requires serious reconsideration as those calls should be wrapped in a user PL/SQL proc.
    The proper and correct method would be to create a log PL/SQL procedure to log messages into an Oracle table, using autonomous transactions.

  • DBMS_OUTPUT.PUT_LINE multi records from PL/SQL procedure to Java web page.

    Hello
    I will explain the scenario:
    In our java web page, we are using three text boxes to enter "Part number,Description and Aircraft type". Every time the user no need to enter all these data. The person can enter any combination of data or only one text box. Actually the output data corresponding to this input entries is from five Oracle table. If we are using a single query to take data from all the five tables, the database will hang. So I written a procedure "SEARCH1",this will accept any combination of values (for empty values we need to pass NULL to this procedure) and output data from all the five tables. When I executing this procedure in SQL editor, the execution is very fast and giving exact result. I used "dbms_output.put_line" clause for outputing multiple records in my procedure. The output variables are "Serial No, part Number, Description, Aircraft type,Part No1,Part No2,Part No3,Part No4". I want to use the same procedure "SEARCH1" for outputing data in java web page.The passing argument I can take from the text box provided in java web page. I am using jdbc thin driver to connect our java web page to Oracle 9i database.
    Note1 : If any combination of search item not available, in procedure itself I am outputing a message like "Part Number not found". Here I am using four words ("Part" is the first word,"Number" is the second,"Not" s the third, and "found" is the fourth) for outputing this message.Is it necessary to equalise number of words I am using here to the record outputing eight variable?
    Our current development work is stopped because of this issue. So any one familier in this field,plese help me to solve our issue by giving the sample code for the same scenario.
    My Email-id is : [email protected]
    I will expect yor early mail.
    With thanks
    Pramod kumar.

    Hello Avi,
    I am trying to solve this issue by using objects. But the following part of code also throwing some warning like "PLS-00302: component must be declared". Plese cross check my code and help me to solve this issue.
    drop type rectab;
    create or replace type rectype as object(PartNo varchar2(30),Description varchar2(150),AIrcraft_type varchar2(15),status_IPC varchar2(30),status_ELOG varchar2(30),status_SUPCAT varchar2(30),status_AIRODWH varchar2(30));
    create or replace type rectab as table of rectype;
    create or replace package ioStructArray as
    procedure testsch2(pno in varchar2,pdes in varchar2,air in varchar2,orec in out rectab);
    end ioStructArray;
    create or replace package body ioStructArray as
    procedure testsch2(pno in varchar2,pdes in varchar2,air in varchar2,orec in out rectab) is
    mdescription varchar2(150);
    mpartnum varchar2(30);
    mpno varchar2(30);
    mdes varchar2(150);
    mair varchar2(15);
    mstat varchar2(1);
    cursor c1 is select partnum,description,aircraft_type from master_catalog where partnum=mpno and aircraft_type=mair and description like ltrim(rtrim(mdes))||'%';
    cursor c2 is select partnum from ipc_master where partnum=mpartnum;
    cursor c3 is select partnum from fedlog_data where partnum=mpartnum;
    cursor c4 is select partnum from superparts where partnum=mpartnum;
    cursor c5 is select part_no from supplier_catalog where part_no=mpartnum;
    mpno1 varchar2(30);
    mpno2 varchar2(30);
    mpno3 varchar2(30);
    mpno4 varchar2(30);
    mpno5 varchar2(30);
    maircraft_type varchar2(15);
    mstat1 varchar2(30);
    mstat2 varchar2(30);
    mstat3 varchar2(30);
    mstat4 varchar2(30);
    begin
    mstat:='N';
    mpno:=pno;
    mdes:=pdes;
    mair:=air;
    if mpno is not null and mdes is not null and mair is not null then
    begin
    mstat:='N';
    mpno:=pno;
    mdes:=pdes;
    mair:=air;
    for i in c1 loop
    mstat:='N';
    mstat1:='N';
    mstat2:='N';
    mstat3:='N';
    mstat4:='N';
    mpno1:=i.partnum;
    mpartnum:=i.partnum;
    mdescription:=i.description;
    maircraft_type:=i.aircraft_type;
    for j in c2 loop
    mpno2:=j.partnum;
    end loop;
    for k in c3 loop
    mpno3:=k.partnum;
    end loop;
    for l in c4 loop
    mpno4:=l.partnum;
    end loop;
    for m in c5 loop
    mpno5:=m.part_no;
    end loop;
    if mpno2=mpartnum then
    mstat1:=mpno2;
    end if;
    if mpno3=mpartnum then
    mstat2:=mpno3;
    end if;
    if mpno4=mpartnum then
    mstat3:=mpno4;
    end if;
    if mpno5=mpartnum then
    mstat4:=mpno5;
    end if;
    if mpno1=mpartnum then
    mstat:='Y';
    orec.PartNo:=mpno1;
    orec.Description:=mdescription;
    orec.AIrcraft_type:=maircraft_type;
    orec.status_IPC:=mstat1;
    orec.status_ELOG:=mstat2;
    orec.status_SUPCAT:=mstat3;
    orec.STATUS_AIRODWH:=status_AIRODWH;
    end if;
    end loop;
    end;
    end if;
    end testsch2;
    end ioStructArray;
    Expecting your early reply.
    With thanks
    Pramod kumar.

Maybe you are looking for

  • Program error when saving in external PCS2

    On my G5 tower, I have imported a new project of jpegs from a digital card. I have exported images to CS2, made changes, then tried to save. I get a dialogue box saying "Could not save because of a program error." This has happened with two separate

  • "Error encountered in source file video"

    I am trying to insert a .mov video into a PPT file using the Adobe Presenter  7.0.5, but I get a message saying "Error encountered in source file video". What is odd is that I was able to insert a video with the same format properties once, and publi

  • Workflow Agent  (HR Position) left vacant, no agent determine by workflow

    Hi, We are using PR release workflow WS00000038 and the procesing agent tie to the Release code is Position (created in SAP HR organisition structure). Currently workflow flow to the Personal number/user ID that assigned under the Position, however o

  • Bing Search button does not load Bing App!!!!

    When I press Bing search button which is on the right side of Windows button, it loads the IE desktop version of Bing instead of the Bing App. I tried with some setting chage in Region+Language and Location as per Microsoft Answer blog but all went i

  • Datasource 0vtype_text not found

    hi im trying to search for 0vtype_text datasource and i couldnt find this in RSA5...and can anyone plz tell me a way to find this datasource thanx in advance Ravi