Error in SQL Procedure

Hi Experts
I have created following procedure which is showing Run Time  error
alter proc Stock_item
as
begin
          create table #temp
          main_Group varchar (40),
          intermediate_group     varchar(40),
          final_Group          varchar,
          item_code varchar(20),
          item_name varchar (50),
          Qty numeric(10,3)
          insert into #temp (item_code, item_name, Qty)
          select itemcode , itemname, onhand from OITM
          update tmp set tmp.main_Group = 'Raw material'
          from OITM T1 , #temp tmp
          where T1.QryGroup1 = 'Y' and T1.Itemcode = tmp.item_code
          select * from #temp
end
Error Message is : Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "SQL_Latin1_General_CP850_CI_AS" in the equal to operation.
Msg 468, Level 16, State 9, Procedure Stock_item, Line 26
Plz check and tell me what can be reason
Regards
Gorge

Hi Gorge,
Try the following:
create table #temp
main_Group varchar (40),
intermediate_group varchar(40),
final_Group varchar,
item_code varchar(20) COLLATE SQL_Latin1_General_CP850_CI_AS,
item_name varchar (50),
Qty numeric(10,3)
Regards,
Andrew.

Similar Messages

  • Error when try to call a pl/sql procedure from the .xsql file

    I tried to call a pl/sql procedure like this:
    <?xml version="1.0"?>
    <page connection="omtest5" xmlns:xsql="urn:oracle-xsql">
    <xsql:include-owa>
    sampleowaxml.testone
    </xsql:include-owa>
    </page>
    but I got the following error message:
    <?xml version="1.0" ?>
    - <page>
    - <xsql-error action="xsql:include-owa">
    <statement>declare buf htp.htbuf_arr; param_names owa.vc_arr; param_values owa.vc_arr; rows integer := 32767; outclob CLOB;begin param_names(1) := 'HTTP_COOKIE'; param_values(1) := ''; param_names(2) := 'SERVER_NAME'; param_values(2) := 'mxfang-nt.us.oracle.com'; param_names(3) := 'SERVER_PORT'; param_values(3) := '80'; param_names(4) := 'SCRIPT_NAME'; param_values(4) := '/servlets/oracle.xml.xsql.XSQLServlet'; param_names(5) := 'PATH_INFO'; param_values(5) := '/xsql/test/myproject.xsql'; param_names(6) := 'HTTP_USER_AGENT'; param_values(6) := 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)'; owa.init_cgi_env(6,param_names,param_values); sampleowaxml.testone owa.get_page(buf,rows); dbms_lob.createtemporary(outclob,true,dbms_lob.session); for i in 1..rows loop dbms_lob.writeappend(outclob,length(buf(i)),buf(i)); end loop; ? := outclob; ? := DBMS_LOB.INSTR(outclob,CHR(10)&#0124; &#0124;CHR(10));end;</statement>
    <message>ORA-06550: line 3, column 3: PLS-00103: Encountered the symbol "OWA" when expecting one of the following: := . ( @ % ; The symbol ":=" was substituted for "OWA" to continue.</message>
    </xsql-error>
    - <xsql-error action="xsql:include-owa">
    <message />
    </xsql-error>
    </page>
    This error message is very similiar to the message that Shanthir posted on Jan, 21. I did run the dbmslob.sql, but it doesn't help. Anybody has ideas how to solve it?
    I used the PL/SQL web toolkit provided by OAS4.0.8.1. I believe oracle web agent is replaced by this toolkit.
    Thanks,
    Min
    null

    Hi,
    Glad that somebody else too got this problem. Well, as I had mentioned in my previous posting too, I think there are some procedures in the package, dbms_lob, like the writeappend, createtemporary etc.. which is not found in my dbms_lob.sql file, I am using 8.0.5, but I found these procedures in the 8i, I think it is becos of that.
    By the way if anybody got this solution and got any workaround, please help me too.
    I am still waiting for the solution to that.
    Shanthi

  • ORA-01458 error while using Pro*C to invoke PL/SQL procedure, pls help

    I am using Pro*C (Oracle 10g on Itanium platform) to invoke PL/SQL procedure to read RAW data from database, but always encoutered ORA-01458 error message.
    Here is the snippet of Pro*C code:
    typedef struct dataSegment
         unsigned short     len;
         unsigned char     data[SIZE_DATA_SEG];
    } msg_data_seg;
    EXEC SQL TYPE msg_data_seg IS VARRAW(SIZE_DATA_SEG);
         EXEC SQL BEGIN DECLARE SECTION;
              unsigned short qID;
              int rMode;
              unsigned long rawMsgID;
              unsigned long msgID;
              unsigned short msgType;
              unsigned short msgPriority;
              char recvTime[SIZE_TIME_STRING];
              char schedTime[SIZE_TIME_STRING];
              msg_data_seg dataSeg;
              msg_data_seg dataSeg1;
              msg_data_seg dataSeg2;
              short     indSeg;
              short     indSeg1;
              short     indSeg2;
         EXEC SQL END DECLARE SECTION;
         qID = q_id;
         rMode = (int)mode;
         EXEC SQL EXECUTE
              BEGIN
                   SUMsg.read_msg (:qID, :rMode, :rawMsgID, :msgID, :msgType, :msgPriority, :recvTime,
                        :schedTime, :dataSeg:indSeg, :dataSeg1:indSeg1, :dataSeg2:indSeg2);
              END;
         END-EXEC;
         // Check PL/SQL execute result, different from SQL
         // Only 'sqlcode' and 'sqlerrm' are always set
         if (sqlca.sqlcode != 0)
              if (sqlca.sqlcode == ERR_QUEUE_EMPTY)          // Queue empty
                   throw q_eoq ();
              char msg[513];                                        // Other errors
              size_t msg_len;
              msg_len = sqlca.sqlerrm.sqlerrml;
              strncpy (msg, sqlca.sqlerrm.sqlerrmc, msg_len);
              msg[msg_len] = '\0';
              throw db_error (string(msg), sqlca.sqlcode);
    and here is the PL/SQL which is invoked:
    SUBTYPE VarChar14 IS VARCHAR2(14);
    PROCEDURE read_msg (
         qID          IN     sumsg_queue_def.q_id%TYPE,
         rMode          IN     INTEGER,
         raw_msgID     OUT     sumsg_msg_data.raw_msg_id%TYPE,
         msgID          OUT sumsg_msg_data.msg_id%TYPE,
         msgType          OUT sumsg_msg_data.type%TYPE,
         msgPrior     OUT sumsg_msg_data.priority%TYPE,
         msgRecv          OUT VarChar14,
         msgSched     OUT VarChar14,
         msgData          OUT sumsg_msg_data.msg_data%TYPE,
         msgData1     OUT sumsg_msg_data.msg_data1%TYPE,
         msgData2     OUT sumsg_msg_data.msg_data2%TYPE
    ) IS
    BEGIN
         IF rMode = 0 THEN
              SELECT raw_msg_id, msg_id, type, priority, TO_CHAR(recv_time, 'YYYYMMDDHH24MISS'),
                   TO_CHAR(sched_time, 'YYYYMMDDHH24MISS'), msg_data, msg_data1, msg_data2
                   INTO raw_msgID, msgID, msgType, msgPrior, msgRecv, msgSched, msgData, msgData1, msgData2
                   FROM (SELECT * FROM sumsg_msg_data WHERE q_id = qID AND status = 0 ORDER BY sched_time, raw_msg_id)
                   WHERE ROWNUM = 1;
         ELSIF rMode = 1 THEN
              SELECT raw_msg_id, msg_id, type, priority, TO_CHAR(recv_time, 'YYYYMMDDHH24MISS'),
                   TO_CHAR(sched_time, 'YYYYMMDDHH24MISS'), msg_data, msg_data1, msg_data2
                   INTO raw_msgID, msgID, msgType, msgPrior, msgRecv, msgSched, msgData, msgData1, msgData2
                   FROM (SELECT * FROM sumsg_msg_data WHERE q_id = qID AND status = 0 ORDER BY recv_time, raw_msg_id)
                   WHERE ROWNUM = 1;
         ELSE
              SELECT raw_msg_id, msg_id, type, priority, TO_CHAR(recv_time, 'YYYYMMDDHH24MISS'),
                   TO_CHAR(sched_time, 'YYYYMMDDHH24MISS'), msg_data, msg_data1, msg_data2
                   INTO raw_msgID, msgID, msgType, msgPrior, msgRecv, msgSched, msgData, msgData1, msgData2
                   FROM (SELECT * FROM sumsg_msg_data WHERE q_id = qID AND status = 0 ORDER BY priority, raw_msg_id)
                   WHERE ROWNUM = 1;
         END IF;
         UPDATE sumsg_msg_data SET status = 1 WHERE raw_msg_id = raw_msgID;
    EXCEPTION
         WHEN NO_DATA_FOUND THEN
              raise_application_error (-20102, 'Queue empty');
    END read_msg;
    where sumsg_msg_data.msg_data%TYPE, sumsg_msg_data.msg_data1%TYPE and sumsg_msg_data.msg_data2%TYPE are all defined as RAW(2000). When I test the PL/SQL code seperately, everything is ok, but if I use the Pro*C code to read, the ORA-01458 always happen, unless I change the SIZE_DATA_SEG value to 4000, then it passes, and the result read out also seems ok, either the bigger or smaller value will encounter ORA-01458.
    I think the problem should happen between the mapping from internal datatype to external VARRAW type, but cannot understand why 4000 bytes buffer will be ok, is it related to some NLS_LANG settings, anyone can help me to resolve this problme, thanks a lot!

    It seems that I found the way to avoid this error. Now each time before I read RAW(2000) data from database, i initialize the VARRAW.len first, set its value to SIZE_DATA_SEG, i.e., the outside buffer size, then the error disappear.
    Oracle seems to need this information to handle its data mapping, but why output variable also needs this initialization, cannot precompiler get this from the definition of VARRAW structure?
    Anyone have some suggestion?

  • Error while pasing arrays to pl/sql procedure

    Hi,
    I am trying to pass an array from java to pl/sql procedure.
    I tried this code:
    CREATE OR REPLACE TYPE HEADER_UPLOAD IS OBJECT
    (VENDOR_NAME VARCHAR2(240) --hr_all_organization_units.name%TYPE
    ,BILL_TO_CUSTOMER_NAME VARCHAR2(240)-- hz_parties.party_name%TYPE
    ,BILL_TO_CUSTOMER_NUMBER VARCHAR2(240) --hz_cust_accounts.account_number%TYPE
    ,BILL_TO_SITE_USE_ID VARCHAR2(240) --hz_cust_site_uses_all.site_use_id%TYPE
    ,RESELLER_NAME VARCHAR2(240) --hz_parties.party_name%TYPE
    ,RESELLER_ADDRESS_1 VARCHAR2(240)--hz_locations.address1%TYPE
    ,RESELLER_ADDRESS_2 VARCHAR2(240)--hz_locations.address2%TYPE
    ,RESELLER_ADDRESS_3 VARCHAR2(240)--hz_locations.address3%TYPE
    ,RESELLER_ADDRESS_4 VARCHAR2(240)--hz_locations.address4%TYPE
    ,RESELLER_COUNTRY VARCHAR2(240)--hz_locations.country%TYPE
    ,RESELLER_STATE VARCHAR2(240) --hz_locations.state%TYPE
    ,RESELLER_CITY VARCHAR2(240)--hz_locations.city%TYPE
    ,RESELLER_POSTAL_CODE VARCHAR2(240)--hz_locations.postal_code%TYPE
    ,FEDERAL_GOVT_END_USER VARCHAR2(240)
    ,END_USER_NAME VARCHAR2(240)--hz_parties.party_name%TYPE
    ,END_USER_ADDRESS_1 VARCHAR2(240)--hz_locations.address1%TYPE
    ,END_USER_ADDRESS_2 VARCHAR2(240)--hz_locations.address2%TYPE
    ,END_USER_ADDRESS_3 VARCHAR2(240)--hz_locations.address3%TYPE
    ,END_USER_ADDRESS_4 VARCHAR2(240)--hz_locations.address4%TYPE
    ,END_USER_COUNTRY VARCHAR2(240)-- hz_locations.country%TYPE
    ,END_USER_STATE VARCHAR2(240) --hz_locations.state%TYPE
    ,END_USER_CITY VARCHAR2(240) --hz_locations.city%TYPE
    ,END_USER_POSTAL_CODE VARCHAR2(240)--hz_locations.postal_code%TYPE
    ,END_USER_CONTACT_NAME VARCHAR2(240)
    ,END_USER_EMAIL VARCHAR2(2000)
    ,SHIP_TO_CUSTOMER_NAME VARCHAR2(240)--ra_customers.customer_name%TYPE
    ,SHIP_TO_ADDRESS_1 VARCHAR2(240) --hz_locations.address1%TYPE
    ,SHIP_TO_ADDRESS_2 VARCHAR2(240) --hz_locations.address2%TYPE
    ,SHIP_TO_ADDRESS_3 VARCHAR2(240) --hz_locations.address3%TYPE
    ,SHIP_TO_ADDRESS_4 VARCHAR2(240) --hz_locations.address4%TYPE
    ,SHIP_TO_COUNTRY VARCHAR2(240) --hz_locations.country%TYPE
    ,SHIP_TO_STATE VARCHAR2(240) --hz_locations.state%TYPE
    ,SHIP_TO_CITY VARCHAR2(240)--hz_locations.city%TYPE
    ,SHIP_TO_POSTAL_CODE VARCHAR2(240)--hz_locations.postal_code%TYPE
    ,SHIP_TO_CONTACT_NAME VARCHAR2(240)
    ,SHIP_TO_CONTACT_PHONE VARCHAR2(50)
    ,SHIPPING_INSTRUCTIONS VARCHAR2(240)--oe_order_headers_all.shipping_instructions%TYPE
    ,SHIPPING_METHOD VARCHAR2(240) --fnd_lookup_values.meaning%TYPE
    ,ALERT_EMAIL VARCHAR2(2000)
    ,LICENSE_EMAIL VARCHAR2(2000)
    ,ORDER_CONTACT_FIRST_NAME VARCHAR2(150)
    ,ORDER_CONTACT_LAST_NAME VARCHAR2(150)
    ,ORDER_CONTACT_PHONE VARCHAR2(50)
    ,ORDER_CONTACT_FAX_NUMBER VARCHAR2(50)
    ,ORDER_CONTACT_EMAIL VARCHAR2(2000)
    ,NOTES VARCHAR2(4000)
    ,CURRENCY_CODE VARCHAR2(240) --fnd_currencies.currency_code%TYPE
    ,SERVICE_RENEWAL_ORDER varchar2(10)
    ,CUSTOMER_PO_NUMBER VARCHAR2(240) --oe_order_headers_all.cust_po_number%TYPE
    ,RESUBMITTED_ORDER VARCHAR2(10)
    ,PREV_CUSTOMER_PO_NUMBER VARCHAR2(240) --oe_order_headers_all.cust_po_number%TYPE
    ,END_USER_PO_NUMBER VARCHAR2(50)
    ,PO_NET_TOTAL NUMBER
    ,FOB VARCHAR2(240) --fnd_lookup_values.meaning%TYPE
    ,FREIGHT_TERMS VARCHAR2(240) --fnd_lookup_values.meaning%TYPE
    ,FREIGHT_ACCOUNT_NUMBER VARCHAR2(200)
    create or replace type header_upload_tab is table of header_upload;
    java code is: this is a java class which first inserts the csv file data into array headerdata
    public static String[] parseCSV(long l)
    throws SQLException, FrameworkException, IOException
    String s = "parseCSV";
    String lResult[] = new String[3];
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "Start");
    OracleConnection oracleconnection = (OracleConnection)TransactionScope.getConnection();
    OraclePreparedStatement oraclepreparedstatement = null;
    OracleResultSet oracleresultset = null;
    BLOB blob = null;
    long l1 = System.currentTimeMillis();
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "Before fetching the File data from FND_LOBS");
    oraclepreparedstatement = (OraclePreparedStatement)oracleconnection.prepareStatement(" SELECT FILE_DATA FROM FND_LOBS WHERE FILE_ID = :1 ");
    oraclepreparedstatement.defineColumnType(1, 2004);
    oraclepreparedstatement.setLong(1, l);
    try
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "Before Executing the query");
    oracleresultset = (OracleResultSet)oraclepreparedstatement.executeQuery();
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "After Executing the query");
    while(oracleresultset.next())
    blob = (BLOB)oracleresultset.getObject(1);
    finally
    if(oracleresultset != null)
    oracleresultset.close();
    if(oraclepreparedstatement != null)
    oraclepreparedstatement.close();
    if(oracleconnection != null)
    TransactionScope.releaseConnection(oracleconnection);
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "Time taken to get the BLOB object(" + (System.currentTimeMillis() - l1) + " milliseconds)");
    l1 = System.currentTimeMillis();
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "Get the stream from the BLOB");
    InputStreamReader inputstreamreader = new InputStreamReader(blob.getBinaryStream());
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "Before creating the csvreader");
    xxbcIbeOrderUploadCSVReader OrderUploadcsvreader = new xxbcIbeOrderUploadCSVReader(inputstreamreader);
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "After creating the csvreader");
    OrderUploadcsvreader.setFieldSeparator(",");
    OrderUploadcsvreader.setHandleEscapes(true);
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "Before getting the headers");
    // Fetch the Header Record
    ArrayList arraylistH = OrderUploadcsvreader.getHeaders();
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "After getting the headers");
    String s1 = (String)arraylistH.get(0);
    if ("HEADER".equals(s1))
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "Parse and Create the Header Record");
    // Fetch the Header Data. This data will be inserted into Staging table, XXBC_IBE_ORDER_HEADER_IFACE
    ArrayList arraylistHData = OrderUploadcsvreader.readRecord();
    String headerData[] = new String[60];
    for(int i = 1; i < arraylistH.size(); i++) {
    headerData[i] = "";
    for(int i = 1; i < arraylistH.size(); i++)
    String h_element = (String)arraylistH.get(i);
    String h_value = (String)arraylistHData.get(i);
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, h_element);
    if ("VENDOR NAME*".equals(h_element)) headerData[1] = h_value;
    if ("BILL TO CUSTOMER*".equals(h_element)) headerData[2] = h_value;
    if ("BILL TO CUSTOMER NUMBER*".equals(h_element)) headerData[3] = h_value;
    if ("BILL TO SITE NUMBER*".equals(h_element)) headerData[4] = h_value;
    if ("RESELLER*".equals(h_element)) headerData[5] = h_value;
    if ("RESELLER ADDRESS LINE 1*".equals(h_element)) headerData[6] = h_value;
    if ("RESELLER ADDRESS LINE 2".equals(h_element)) headerData[7] = h_value;
    if ("RESELLER ADDRESS LINE 3".equals(h_element)) headerData[8] = h_value;
    if ("RESELLER ADDRESS LINE 4".equals(h_element)) headerData[9] = h_value;
    if ("RESELLER COUNTRY*".equals(h_element)) headerData[10] = h_value;
    if ("RESELLER STATE*".equals(h_element)) headerData[11] = h_value;
    if ("RESELLER CITY*".equals(h_element)) headerData[12] = h_value;
    if ("RESELLER POSTAL CODE*".equals(h_element)) headerData[13] = h_value;
    if ("FEDERAL GOVT END USER".equals(h_element)) headerData[14] = h_value;
    if ("END USER*".equals(h_element)) headerData[15] = h_value;
    if ("END USER ADDRESS LINE 1*".equals(h_element)) headerData[16] = h_value;
    if ("END USER ADDRESS LINE 2".equals(h_element)) headerData[17] = h_value;
    if ("END USER ADDRESS LINE 3".equals(h_element)) headerData[18] = h_value;
    if ("END USER ADDRESS LINE 4".equals(h_element)) headerData[19] = h_value;
    if ("END USER COUNTRY*".equals(h_element)) headerData[20] = h_value;
    if ("END USER STATE*".equals(h_element)) headerData[21] = h_value;
    if ("END USER CITY*".equals(h_element)) headerData[22] = h_value;
    if ("END USER POSTAL CODE*".equals(h_element)) headerData[23] = h_value;
    if ("END USER CONTACT**".equals(h_element)) headerData[24] = h_value;
    if ("END USER CONTACT EMAIL**".equals(h_element)) headerData[25] = h_value;
    if ("SHIP TO CUSTOMER*".equals(h_element)) headerData[26] = h_value;
    if ("SHIP TO ADDRESS LINE 1*".equals(h_element)) headerData[27] = h_value;
    if ("SHIP TO ADDRESS LINE 2".equals(h_element)) headerData[28] = h_value;
    if ("SHIP TO ADDRESS LINE 3".equals(h_element)) headerData[29] = h_value;
    if ("SHIP TO ADDRESS LINE 4".equals(h_element)) headerData[30] = h_value;
    if ("SHIP TO COUNTRY*".equals(h_element)) headerData[31] = h_value;
    if ("SHIP TO STATE*".equals(h_element)) headerData[32] = h_value;
    if ("SHIP TO CITY*".equals(h_element)) headerData[33] = h_value;
    if ("SHIP TO POSTAL CODE*".equals(h_element)) headerData[34] = h_value;
    if ("SHIP TO CONTACT**".equals(h_element)) headerData[35] = h_value;
    if ("SHIP TO CONTACT PHONE NUMBER**".equals(h_element)) headerData[36] = h_value;
    if ("SHIPPING INSTRUCTIONS".equals(h_element)) headerData[37] = h_value;
    if ("SHIPPING METHOD*".equals(h_element)) headerData[38] = h_value;
    if ("ALERT EMAIL*".equals(h_element)) headerData[39] = h_value;
    if ("LICENSE EMAIL**".equals(h_element)) headerData[40] = h_value;
    if ("ORDER CONTACT FIRST NAME*".equals(h_element)) headerData[41] = h_value;
    if ("ORDER CONTACT LAST NAME*".equals(h_element)) headerData[42] = h_value;
    if ("ORDER CONTACT PHONE NUMBER*".equals(h_element)) headerData[43] = h_value;
    if ("ORDER CONTACT FAX NUMBER".equals(h_element)) headerData[44] = h_value;
    if ("ORDER CONTACT EMAIL*".equals(h_element)) headerData[45] = h_value;
    if ("NOTES".equals(h_element)) headerData[46] = h_value;
    if ("CURRENCY*".equals(h_element)) headerData[47] = h_value;
    if ("SERVICE RENEWAL ORDER".equals(h_element)) headerData[48] = h_value;
    if ("CUSTOMER PO NUMBER*".equals(h_element)) headerData[49] = h_value;
    if ("RESUBMISSION*".equals(h_element)) headerData[50] = h_value;
    if ("PREVIOUS CUSTOMER PO NUMBER**".equals(h_element)) headerData[51] = h_value;
    if ("END USER PO NUMBER".equals(h_element)) headerData[52] = h_value;
    if ("PO NET TOTAL*".equals(h_element)) headerData[53] = h_value;
    if ("FOB*".equals(h_element)) headerData[54] = h_value;
    if ("FREIGHT TERMS*".equals(h_element)) headerData[55] = h_value;
    if ("FREIGHT ACCOUNT NUMBER".equals(h_element)) headerData[56] = h_value;
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, (String)headerData);
    } // End of processing Header Data
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "Insert the Header Record into Interface Table");
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, (String)headerData[1]);
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, (String)headerData[2]);
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "checkpoint");
    oracleconnection = (OracleConnection)TransactionScope.getConnection();
    oracleconnection.setAutoCommit(true);
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "After getting connection");
    ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor( "HEADER_UPLOAD_TAB", oracleconnection );
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "before new array");
    ARRAY array_to_pass = new ARRAY( descriptor, oracleconnection, headerData );
    if(IBEUtil.logEnabled())
    IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "calling procedure");
    OraclePreparedStatement ps =
    (OraclePreparedStatement)oracleconnection.prepareStatement ( "BEGIN insert_data(:1); END;" );
    ps.setARRAY( 1, array_to_pass );
    ps.execute();.......continued
    the above code executes till the message :---IBEUtil.log("oracle.apps.ibe.shoppingcart.util.OrderUploadCSVReader", s, "before new array");
    after that it gives error as :---Exception=java.sql.SQLException: Fail to convert to internal representation
    Kindly Help....
    Thanks in advance
    Gaurav

    Gaurav,
    Just a guess, but try the following:
    ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor( "SCOTT.HEADER_UPLOAD_TAB", oracleconnection );In other words, prefix the data-type name, HEADER_UPLOAD_TAB, with its schema owner name.
    Good Luck,
    Avi.

  • Insertin Data useing SQL Procedure Getting Error ORA-00942 and ORA-06512

    I have two Schemas ISYS and ISYSTWO
    I had created a Stored Procedure RECINC2 in Schema ISYS
    as
    procedure recinc2(cName IN CHAR,cWhere IN CHAR,cTable in CHAR)
    AS
    cQry VARCHAR2(1000);
    BEGIN
    cQry := 'INSERT INTO '||cName||'.'||cTable||' SELECT * FROM '||cTable|| ' WHERE ||cWhere;
    dbms_output.put_line(cqry);
    EXECUTE IMMEDIATE cQry;
    end;
    NOW WHEN in Run it gives error
    SQL> begin
    2 recinc2('ISYSTWO','CODE=4','AGENTS');
    3 end;
    4 /
    INSERT INTO ISYSTWO.AGENTS SELECT * FROM AGENTS WHERE CODE=4
    begin
    ERROR at line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at "ISYS.RECINC2", line 8
    ORA-06512: at line 2
    BUT IF I EXECUTE
    the DBMS output
    INSERT INTO ISYSTWO.AGENTS SELECT * FROM AGENTS WHERE CODE=4
    it executes and gives fine result
    Please help
    Thanks
    Chaand kackria

    SQL> conn ISYSTWO/ISYSTWO
    Connected.
    SQL> grant all on agents to isys;
    Grant succeeded.
    SQL> conn isys/isys
    Connected.
    SQL> exec recinc2('ISYSTWO','CODE=4','AGENTS');
    INSERT INTO ISYSTWO.AGENTS SELECT * FROM AGENTS WHERE CODE=4
    PL/SQL procedure successfully completed.

  • Error during calling PL/SQL procedure

    Hi,
    Error occurs while calling the oracle PL/SQL procedure from Java using Callable Statement.
    Below is my code
    cs = conn.prepareCall("{call prc_ins(?, ?, ?, ?, ?, ?,?)}");                              cs.setString(1, strAryCols[11]);
         cs.setString(2, strAryCols[5]);
         cs.setString(3, strAryCols[8]);
         cs.setString(4, strAryCols[10]);
         cs.setString(5, strAryCols[7]);
         cs.setString(6, "ER");     
         cs.registerOutParameter(7, Types.VARCHAR);
         cs.execute();
    I receive the following Error Message
    Error in Inserting: ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'PRC_INS'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Can somebody help?
    Regards,
    RPS15

    RPS15 wrote:
    Hi,
    Error occurs while calling the oracle PL/SQL procedure from Java using Callable Statement.
    Below is my code
    cs = conn.prepareCall("{call prc_ins(?, ?, ?, ?, ?, ?,?)}");                              cs.setString(1, strAryCols[11]);
         cs.setString(2, strAryCols[5]);
         cs.setString(3, strAryCols[8]);
         cs.setString(4, strAryCols[10]);
         cs.setString(5, strAryCols[7]);
         cs.setString(6, "ER");     
         cs.registerOutParameter(7, Types.VARCHAR);
         cs.execute();
    I receive the following Error Message
    Error in Inserting: ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'PRC_INS'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Can somebody help?
    Regards,
    RPS15Most of the times I see people calling stored procedures which return an output parameter, the SQL looks like this:
    {? = call blah(?, ?, ...)}
    [http://www.google.com/search?hl=en&q=prepareCall+call+registerOutParameter]

  • 403 Forbidden error calling PL/SQL Procedure from URL

    I am getting a 403 Forbidden browser error when calling a PL/SQL procedure from the URL, as in this:
    http://<server.port>/apex/SCHEMA.procedure_name/f?p_param1=394&p_param2=2, etc
    We are upgrading from HTMLDB 2.0 to APEX 4.0.2. I do not believe the upgrade has anything to do with it, c/o the upgraded app works fine in another APE 4.0.2 environment.
    The upgrade is to new machines, new DB and new app server, Oracle Web Tier, Oracle HTTP server deployment.
    The dads.conf entries are fine, all standard:
    Alias /i/ "/apexd01/app/oracle/product/http/Oracle_WT1/ohs/images/"
    Alias /c/ "/apexd01/app/oracle/product/http/Oracle_WT1/ohs/custom_htmldb/"
    <Location /pls/apexd>
    Order deny,allow
    PlsqlDocumentPath docs
    AllowOverride None
    PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
    PlsqlDatabaseConnectString dbserver.us.com:1521:SERVER.US.COM ServiceNameFormat
    PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8
    PlsqlAuthenticationMode Basic
    SetHandler pls_handler
    PlsqlDocumentTablename wwv_flow_file_objects$
    PlsqlDatabaseUsername APEX_PUBLIC_USER
    PlsqlDefaultPage apex
    PlsqlDatabasePassword apexpwd
    PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize
    Allow from all
    </Location>
    The GRANT EXECUTE ON procedure TO PUBLIC is there.
    A call to the same procedure via a process in an APEX page works fine - the procedure is OK.
    The call from javascript, which sets up the call from the URL, is the one that fails with the 403 Forbidden error.
    The same app works fine in another APEX 4.0.2 environment, so I know it is not the JS; It has to be some configuration setting in this environment.
    I do NOT have access to the app server.
    I have asked that they compare the httpd.conf, and all underlying conf files, to check for differences.
    In order for me to be more specific, and hopefully speed up the troubleshooting process, can anyone suggest what other settings to look at?
    Thank you - Karen

    Hello,
    Good catch, but the difference in URL is in fact the difference in my env to theirs. My typo in not correcting my example to match the dads.conf entry of /pls/apexd. My env uses /apex/. Just saves on my typing.
    As an update, I asked the DBA to double-check, and yes, the www_flow_epg_include_mod_local function IS there.
    www_flow_epg_include_mod_local is an APEX function.
    So now we are trying adding procedures to it. I'll let you know if it works.
    My previous question remains - why would I need to do this in one env, and not another,
    given that the DB GRANTs are there.
    Is there a particular app server setting that wil block execution of PL/SL procedures from the URL?
    My guess is, there is some difference in configuration settings for the app server, somewhere in the httpd.conf chain.
    Since I do not have access to those files, I cannot do a diff myself, as I would have if I the issue was on my machine.
    I am in a situation where I can suggest what to do, but that's it. I agree, it's hard to troubleshoot in this situation.
    I am being asked "what setting do I need to change?" without the benefit of access to what is there,so I am doing the best I can, without diverting from my work for a deep-dive refresher session on httpd.conf settings.
    So, if anyone is aware of some setting that would block execution of a PL/SQL proc from the URL, please let me know,
    and of course, if adding a proc to www_flow_epg_include_mod_local works, I'll be happy. Just still curious.
    Thank you - K

  • Sql server services give error the remote procedure call failed [0x800706be] in sql server 2008

    sql server services give error the remote procedure call failed [0x800706be] in sql server 2008.
    To resolve this issue, I executed the following mofcomp command in command prompt to re-register the *.mof files:
    mofcomp.exe "C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof".
    but it does not work.
    Plz give the exact soln to solve this error.

    sql server services give error the remote procedure call failed [0x800706be] in sql server 2008.
    To resolve this issue, I executed the following mofcomp command in command prompt to re-register the *.mof files:
    mofcomp.exe "C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof".
    but it does not work.
    Plz give the exact soln to solve this error.
    So when you tried starting SQL server service it gave the error right  ?  or when you click on SQL server services in SQL server configuration manager(SSCM) you get this error. Can you be more clear.  As far as I read your question it has something
    to do with permission. Close SSCM window and this time  right click on SQL server configuration manager and select run as administrator and check if you can see SQL server services
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Articles

  • DB Adapter calling PL/SQL Procedure gives error

    Created partner link, calling pl/sql procedure with one in variable and one out variable. Invoke works fine. Assigning pl/sql return value to output is causing run time error. "Rebuild" and "Deploy" works file.
    Here is the error:
    Assign_2
    [2007/08/03 14:18:06]
    Error in evaluate <from> expression at line "93". The result is empty for the XPath expression : "/ns3:OutputParameters/ns3:OUT_STATUS_CODE".
    oracle.xml.parser.v2.XMLElement@ba1893
    Copy details to clipboard
    [2007/08/03 14:18:06]
    "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.
    - <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
    - <part name="summary">
    <summary>
    empty variable/expression result.
    xpath variable/expression expression "/ns3:OutputParameters/ns3:OUT_STATUS_CODE" is empty at line 93, when attempting reading/copying it.
    Please make sure the variable/expression result "/ns3:OutputParameters/ns3:OUT_STATUS_CODE" is not empty.
    </summary>
    </part>
    </selectionFailure>
    Any input would be appreciated..
    Thanks.

    Thanks, it works.
    In the “Assign Variables”
    Changed from:
    <copy>
    <from variable="Invoke_1_ASNDBTest103_OutputVariable"
    part="OutputParameters" query="/ns3:OutputParameters/ns3:OUT_STATUS_CODE"/>
    <to variable="outputVariable" part="payload"
    query="/ns2:ASNReturnStatus102"/>
    </copy>
    Changed to:
    <copy>
    <from variable="Invoke_1_ASNDBTest103_OutputVariable"
    part="OutputParameters" query="/ns3:OutputParameters"/>
    <to variable="outputVariable" part="payload"
    query="/ns2:ASNReturnStatus102"/>
    </copy>
    So far so good, but one question, compiler gives warning…but everything works well.
    Warning(97):
    [Error ORABPEL-10041]: Trying to assign incompatible types
    [Description]: in line 97 of "C:\HOME\jdevOAExt3\jdevhome\jdev\mywork\ASNTest101\BPELProcess1\bpel\BPELProcess1.bpel", <from> value type "{http://xmlns.oracle.com/pcbpel/adapter/db/APPS/XRX_BPEL_INSERT_ASN_TMP102/}OutputParameters anonymous type" is not compatible with <to> value type "{http://www.thiscompany.com/ns/sales}ASNReturnStatus102".
    [Potential fix]: Please make sure that the return value of from-spec query is compatible with the to-spec query.
    Also, instead of direct variable to variable copy, used expression to variable copy and it works. You can avoid the warning from the compiler.
    Does not work ==> bpws:getVariableData('Invoke_1_ASNDBTest103_OutputVariable','payload','/ns3:OutputParameters/ns3:OUT_STATUS_CODE')
    Works ==> bpws:getVariableData('Invoke_1_ASNDBTest103_OutputVariable','payload','/ns3:OutputParameters’)
    So, why the compiler warning?

  • How to raise Workflow error from pl/sql procedure

    Hi,
    I have this OWB mapping that runs a PL/SQL procedure. The mapping is deployed to Workflow and OEM. The workflow is scheduled and run from OEM,
    and I can watch its progress/completion in the Workflow Monitor. Occasionally, the PL/SQL hits a situation I want to flag as an error to OWF so
    that the OWF standard error process can be activated.
    How can I do that? I try to raise an exception from the proc by calling OWF's core API (WF_CORE.RAISE etc.), but nothing happens.
    From Workflow monitor no errors are detected, and the workflow seems to complete normally.
    Any clues?
    Regards
    Rolf

    Rolf,
    I am no workflow expert but it seems to me that you trying to build a workflow exception handler by using the engine APIs (WF_ENGINE). In particular, you could call the WF_ENGINE.ABORT_PROCESS API and set the status to exception. This can be called from an exception handler using the WF_ENGINE.HandleError API.
    As far as I know, the WF_CORE API mentioned by you will simply return an exception to the caller, but this will not affect the process flow.
    For more details, please take a look at the workflow documentation, in particular if you log into the metalink site (metalink.oracle.com), go to the document http://metalink.oracle.com/cgi-bin/cr/getfile_cr.cgi?282250 which is the user's guide and look under chapter 8 which deals with APIs.
    Regards:
    Igor

  • Error-code OWS-00037 with doc/lit WS for a pl/sql procedure in 10.1.3.1

    Hi.
    I'm having a problem when I generate a doc/lit webservice for a pl/sql procedure that returns a collection type containing complex types. During the generation of the service JDeveloper returns with a stack trace in which it complains about zero or more soap headers and it shows fault-code: OWS-00037.
    For clarity, I did not specify any soap headers in the wizard and also did not a add any type mappings.
    I will add the complete stack-trace later to this thread..
    Hope you can help me..
    -Tom

    Hi,
    Glad that somebody else too got this problem. Well, as I had mentioned in my previous posting too, I think there are some procedures in the package, dbms_lob, like the writeappend, createtemporary etc.. which is not found in my dbms_lob.sql file, I am using 8.0.5, but I found these procedures in the 8i, I think it is becos of that.
    By the way if anybody got this solution and got any workaround, please help me too.
    I am still waiting for the solution to that.
    Shanthi

  • Unable to capture the parameter values from a PL/SQL procedure

    hi.
    i'm trying to capture the parameter values of a PL/SQL procedure by calling inside a anonymous block but i'm getting a "reference to uninitialized collection error" ORA-06531.
    Please help me regarding.
    i'm using following block for calling the procedure.
    declare
    err_cd varchar2(1000);
    err_txt VARCHAR2(5000);
    no_of_recs number;
    out_sign_tab search_sign_tab_type:=search_sign_tab_type(search_sign_type(NULL,NULL,NULL,NULL,NULL));
    cntr_var number:=0;
    begin
         rt843pq('DWS','3000552485',out_sign_tab,no_of_recs,err_cd,err_txt);
         dbms_output.put_line('The error is ' ||err_cd);
         dbms_output.put_line('The error is ' ||err_txt);
         dbms_output.put_line('The cntr is ' ||cntr_var);
         for incr in 1 .. OUT_SIGN_TAB.count
         loop
         cntr_var := cntr_var + 1 ;
    Dbms_output.put_line(OUT_SIGN_TAB(incr).ref_no||','||OUT_SIGN_TAB(incr).ciref_no||','||OUT_SIGN_TAB(incr).ac_no||','||OUT_SIGN_TAB(incr).txn_type||','||OUT_SIGN_TAB(incr).objid);
    end loop;
    end;
    Error is thrown on "for incr in 1 .. OUT_SIGN_TAB.count" this line
    Following is some related information.
    the 3rd parameter of the procedure is a out parameter. it is a type of a PL/SQL table (SEARCH_SIGN_TAB_TYPE) which is available in database as follows.
    TYPE "SEARCH_SIGN_TAB_TYPE" IS TABLE OF SEARCH_SIGN_TYPE
    TYPE "SEARCH_SIGN_TYPE" AS OBJECT
    (ref_no VARCHAR2(22),
    ciref_no VARCHAR2(352),
    ac_no VARCHAR2(22),
    txn_type VARCHAR2(301),
    objid VARCHAR2(1024))............

    We don't have your rt843pq procedure, but when commenting that line out, everything works:
    SQL> create TYPE "SEARCH_SIGN_TYPE" AS OBJECT
      2  (ref_no VARCHAR2(22),
      3  ciref_no VARCHAR2(352),
      4  ac_no VARCHAR2(22),
      5  txn_type VARCHAR2(301),
      6  objid VARCHAR2(1024))
      7  /
    Type is aangemaakt.
    SQL> create type "SEARCH_SIGN_TAB_TYPE" IS TABLE OF SEARCH_SIGN_TYPE
      2  /
    Type is aangemaakt.
    SQL> declare
      2    err_cd varchar2(1000);
      3    err_txt VARCHAR2(5000);
      4    no_of_recs number;
      5    out_sign_tab search_sign_tab_type:=search_sign_tab_type(search_sign_type(NULL,NULL,NULL,NULL,NULL));
      6    cntr_var number:=0;
      7  begin
      8    -- rt843pq('DWS','3000552485',out_sign_tab,no_of_recs,err_cd,err_txt);
      9    dbms_output.put_line('The error is ' ||err_cd);
    10    dbms_output.put_line('The error is ' ||err_txt);
    11    dbms_output.put_line('The cntr is ' ||cntr_var);
    12    for incr in 1 .. OUT_SIGN_TAB.count
    13    loop
    14      cntr_var := cntr_var + 1 ;
    15      Dbms_output.put_line(OUT_SIGN_TAB(incr).ref_no||','||OUT_SIGN_TAB(incr).ciref_no||','||OUT_SIGN_TAB(incr).ac_no||','||OUT_SIGN
    TAB(incr).txntype||','||OUT_SIGN_TAB(incr).objid);
    16    end loop;
    17  end;
    18  /
    The error is
    The error is
    The cntr is 0
    PL/SQL-procedure is geslaagd.Regards,
    Rob.

  • Logical error in this procedure

    Hi,
    I have creted this procedure when i execute it,
    procedure created successfully, but when i run the procedute then it gives this error
    *ERROR at line 1:
    ORA-00933: SQL command not properly ended
    ORA-06512: at "POI_RELEASE.SPECIAL_YPOL", line 13
    ORA-06512: at line 1
    CREATE or REPLACE PROCEDURE SPECIAL_YPOL
    (tablename IN VARCHAR2,
         fieldname IN VARCHAR2)
    AUTHID CURRENT_USER
    IS
    BEGIN
    EXECUTE IMMEDIATE 'Update '      
                        ||tableName
                        || ' set '
                        ||fieldname
                        ||' =REPLACE('     
                        ||fieldname     
                   ||',CHR(38) || ''QUOT,'',CHR(39)) WHERE'
                        ||FIELDNAME
                        ||'LIKE ''%'' || CHR(38) || ''QUOT,''';
    OMMIT;
    END;
    /

    If this was ancient times, and you wrote this code to run on any of my databases, I would have handed your over to the SQL Inquisition for showing you the error of your ways.
    This is exactly how NOT to write code in Oracle. This is exactly how to cause performance problems in Oracle. This is exactly how to trash and fragment the Oracle Shared Pool. This is exactly how to design code and applications that are fragile and generate weirdly non-wonderful runtime errors.
    On the performance side... this is what I posted not even a week ago to show just how stupid this approach you're using is:
    SQL> create table footab( n number );
    Table created.
    SQL> set timing on
    SQL>
    SQL> -- doing a 100,000 inserts using a bind variable
    SQL> declare
    2 sqlInsert varchar2(1000);
    3 begin
    4 sqlInsert := 'insert into footab( n ) values( :0 )';
    5 for i in 1..100000
    6 loop
    7 execute immediate sqlInsert using i;
    8 end loop;
    9 end;
    10 /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:04.91
    SQL>
    SQL> -- doing a 100,000 inserts without using a bind variable
    SQL> declare
    2 sqlInsert varchar2(1000);
    3 begin
    4 -- need to built a unique SQL for each insert
    5 for i in 1..100000
    6 loop
    7 sqlInsert := 'insert into footab( n ) values( '||i||' )';
    8 execute immediate sqlInsert;
    9 end loop;
    10 end;
    11 /
    PL/SQL procedure successfully completed.
    Elapsed: 00:05:21.47
    SQL>So.. you want to turn something that should run in a few seconds, to something that takes several minutes to run.
    Great stuff!! Pardon me, but I think I will need yet another cup of coffee to see me through this morning's browsing of Oracle Forums..

  • How to call a PL/SQL procedure from Portal

    Env.Info: Windows NT Server 4 (Service Pack 3) / Oracle 8i R3 EE / Oracle Portal 3.0 Production.
    I created a new schema "BISAPPS" and created a user with the same name. Ran provsyns.sql script to grant Portal API access. Created a new package under this new schema and compiled it against the database. After that I registered the schema as a portal provider. There were no errors.
    Now I logged into Portal using the account PORTAL30. Refreshed the portlet repository and the new portlets appeared. I added the new portlet to the page. It is displayed successfully.
    New portlet allows the user to enter a bug-number and lets the user to either view or edit. If the user clicks on the button "Edit", it opens a new window and displays the contents from BugDB application. But if the user clicks on "Show", it should display the output generated by a PL/SQL procedure (Owned by the above New Schema - BISAPPS) in a separate window. But instead it is displaying the following error in the separate window:
    bisapps_pkg.buginfo: PROCEDURE DOESN'T EXIST.
    DAD name: PORTAL30
    PROCEDURE : bisapps_pkg.buginfo
    URL : http://host_name:80/pls/portal30/bisapps_pkg.buginfo
    And list of environment variables ....
    Can anyone help me? How can I call a PL/SQL procedure when the button is clicked? Thanks in advance.

    You must grant EXECUTE privilege on your procedure to the PORTAL30_PUBLIC user. If the error still persists, create a PUBLIC synonym for your procedure.

  • Unable to call a pl/sql procedure from java

    Software : Oracle 9i & Red hat linux 9
    Code:
    import java.io.*;
    import java.sql.*;
    public class test
    public static void main(String args[])
    try
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection con=DriverManager.getConnection("jdbc:oracle:thin:@192.168.0.221:1521:elearn","gowri","gowri");
    CallableStatement call=con.prepareCall("{call ins(?,?,?,?)}");
    call.setInt(1,5);
    call.setString(2,"hari");
    call.setString(3,"m");
    call.setString(4,"1976-12-26");
    if ( call.execute() )
    System.out.println("Success");
    else
    System.out.println("fails");
    call.close();
    con.close();
    catch(Exception ex)
    System.out.println("Error :"+ex);
    ~
    ~
    ~
    Stored Procedure:
    create or replace procedure ins(no in number,name in varchar,sex in varchar,dob in varchar)is
    con_day date;
    begin
    con_day=to_date(dob,'yyyy-mm-dd');
    insert into person values(no,name,sex,con_day);
    end;
    Run Time Error:
    Exception in thread "main" java.lang.IncompatibleClassChangeError: oracle.jdbc.driver.OraclePreparedStatement
    at 0x40268e17: java.lang.Throwable.Throwable(java.lang.String) (/usr/lib/./libgcj.so.3)
    at 0x4025bc8e: java.lang.Error.Error(java.lang.String) (/usr/lib/./libgcj.so.3)
    at 0x4025d6b6: java.lang.LinkageError.LinkageError(java.lang.String) (/usr/lib/./libgcj.so.3)
    at 0x4025c7aa: java.lang.IncompatibleClassChangeError.IncompatibleClassChangeError(java.lang.String) (/usr/lib/./libgcj.so.3)
    at 0x40229eed: JvPrepareClass(java.lang.Class) (/usr/lib/./libgcj.so.3)
    at 0x40248028: java.lang.ClassLoader.linkClass0(java.lang.Class) (/usr/lib/./libgcj.so.3)
    at 0x4025acb3: java.lang.ClassLoader.resolveClass0(java.lang.Class) (/usr/lib/./libgcj.so.3)
    at 0x402299cb: JvPrepareClass(java.lang.Class) (/usr/lib/./libgcj.so.3)
    at 0x40248028: java.lang.ClassLoader.linkClass0(java.lang.Class) (/usr/lib/./libgcj.so.3)
    at 0x4025acb3: java.lang.ClassLoader.resolveClass0(java.lang.Class) (/usr/lib/./libgcj.so.3)
    at 0x4024646c: java.lang.Class.initializeClass() (/usr/lib/./libgcj.so.3)
    at 0x40230912: JvInterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x40230ff4: JvInterpMethod.run(ffi_cif, void, ffi_raw, JvInterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x4022e504: JvInterpMethod.run_normal(ffi_cif, void, ffi_raw, void) (/usr/lib/./libgcj.so.3)
    at 0x4038305c: ?? (??:0)
    at 0x403831e7: ffi_call_SYSV (/usr/lib/./libgcj.so.3)
    at 0x403831a7: ffi_raw_call (/usr/lib/./libgcj.so.3)
    at 0x402306e8: JvInterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x40230ff4: JvInterpMethod.run(ffi_cif, void, ffi_raw, JvInterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x4022e58a: JvInterpMethod.run_synch_object(ffi_cif, void, ffi_raw, void) (/usr/lib/./libgcj.so.3)
    at 0x4038305c: ?? (??:0)
    at 0x403831e7: ffi_call_SYSV (/usr/lib/./libgcj.so.3)
    at 0x403831a7: ffi_raw_call (/usr/lib/./libgcj.so.3)
    at 0x402306e8: JvInterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x40230ff4: JvInterpMethod.run(ffi_cif, void, ffi_raw, JvInterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x4022e504: JvInterpMethod.run_normal(ffi_cif, void, ffi_raw, void) (/usr/lib/./libgcj.so.3)
    at 0x4038305c: ?? (??:0)
    at 0x40242dd8: gnu.gcj.runtime.FirstThread.call_main() (/usr/lib/./libgcj.so.3)
    at 0x402ad02d: gnu.gcj.runtime.FirstThread.run() (/usr/lib/./libgcj.so.3)
    at 0x4024fc4c: JvThreadRun(java.lang.Thread) (/usr/lib/./libgcj.so.3)
    at 0x4021c8ac: JvRunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/./libgcj.so.3)
    at 0x08048910: ?? (??:0)
    at 0x42015574: __libc_start_main (/lib/tls/libc.so.6)
    at 0x080486c1: ?? (??:0)

    Hi Gowrishankar,
    This is just a suggestion (based on a guess). Try changing this line of your code:
    call.setInt(1,5);with this line:
    call.setBigDecimal(1,5);Good Luck,
    Avi.

Maybe you are looking for

  • Radeon / kms / dri problems

    Hi, after messing around a few days with my new arch installation (and probably every other live distro in the last few weeks), I'm really tired of the problems related with the open source radeon driver. I read the ATI guide as well as the Xorg guid

  • Why can I NOT name a Reminder List the exact same thing as a Calendar?

    Remember the good old days when ToDo Lists where automatically related to a specific calendar?  I want that back.  Why can I not name a Reminder List and a Calendar with identical titles?  Why do I have to create a calendar named "Blue Project" and t

  • Some images not loading on web pages

    Using my laptop which Has Windows 7, some images are not loading on every web page, for example the header bar with the fox is not displayed on the firefox home page. I can't log out of my online banking as the yes or no boxes are not displayed. The

  • Where is the xboxdrv configuration file?

    I'm using an Xbox 360 Afterglow wired USB controller. I've got xboxdrv installed and I got it working: Left joystick: mouse Right joystick seems to do nothing D-Pad seems to do nothing A is left-click B is middle-click X is right-click Not sure what

  • Registering the add-on in SAP B1

    Hi All, Can anyone tell me that what is the process for registering add-on in SAP B1.