Stored Procedure w/ binary data parameter problems in Visual Basic

Howdy all.
I am having a problem calling stored procedures with a BLOB parameter. I have tried changing the paramater other data types to see if it would work, but with no success. I am calling the stored procedure from Visual Basic using ADO. I am using the Oracle ODBC Driver, Release 9.2.0.4.0. I have tried changing the setup of the ODBC a good bit because that has fixed several problems for me in the past; however, it did not fix my current problem.
Here is what I am trying to do. I have a function like the folowing:
<BEGIN --------------------------------------->
CREATE OR REPLACE FUNCTION PAGEFORMATSINSERT(
p_ObjectFormatCode_ID      IN RAW DEFAULT NULL,
p_PA_ID      IN RAW DEFAULT NULL,
p_Name      IN VARCHAR2 DEFAULT NULL,
p_FormatData      IN BLOB DEFAULT NULL,
p_PF_ID      IN OUT RAW )
RETURN INTEGER
AS
BEGIN
INSERT INTO PAGEFORMATS (PF_ID, ObjectFormatCode_ID, PA_ID, Name, FormatData) /* <---- this FormatData column is a BLOB column */
VALUES     (p_PF_ID, p_ObjectFormatCode_ID, p_PA_ID, p_Name, p_FormatData)
END PAGEFORMATSINSERT;
<END ----------------------------------------->
The FormatData parameter has a data type of BLOB. In my Visual Basic, I have my ADODB.Command object. I am setting the CommandText of the Command object to "{? = call PageFormatsInsert(?, ?, ?, ?, ?)}". In order to set the parameter value for the BLOB data type, I am calling the AppendChunk function of the Command object - passing it a Byte array.
I am getting the folling error:
     ERROR: -2147467259 [Oracle][ODBC][Ora]ORA-06550: line 1, column 13:
     PLS-00306: wrong number or types of arguments in call to 'PAGEFORMATSINSERT'
     ORA-06550: line 1, column 7:
     PL/SQL: Statement ignored
If I change the FormatData parameter to a LONG RAW parameter, I get the following error:
     ERROR: -2147467259 [Oracle][ODBC][Ora]ORA-06502: PL/SQL: numeric or value error: hex to raw conversion error
     ORA-06512: at line 1
I am at a loss as to how to get binary data into by Oracle database. I need to do it using stored procedures. How can I set up my stored procedure or table to do what I want it to do? Should I change my table definition? Are there some settings in the ODBC connection I can tweak? How can I get the stored procedure to accept my call from VB ADO?
Any help would be appreciated.
wally

Thanks for the idea, but I don't get how I am supposed to get my binary data to the stored procedure using the stream. I have a binary array that I want to pass to a stored procedure. I want to be able to use the same Visual Basic front end with out MSSQL database as with our Oracle database.
I am using the ADODB Connection and Command and RecordSet objects. Currenlty our front end calls the ADODB.Command(ParamNumber).AppendChunk function passing it the binary array. Somehow, the SQL Server driver does the magic in order for the MSSQL stored procedure to work correctly. I need to know how to do one of the following:
1. Get the Oracle driver to do the same magic.
2. Set up the Oracle stored procedure so I don't have to change the VB front end.
3. Change the VB front end so that it works with both MSSQL and Oracle.
wally

Similar Messages

  • Stored Procedure returning 5GB data in sinle out parameter.

    Hi,
    A stored procedure takes data from the tables of database. Stored Procedure have one output parameter which should out put 5gb data (Prefer in 100k chunks if possible).
    PROBLEM IS "A stored procedure local variable can not keep Data>34k".
    If out put data size in output parameter < 34k every thing works properly. But when data in output param increases 34k. Oracle raise error.
    Define SOLUTION.
    I'm using OLEDB to call stored procedures. Is it possible to have 5GB data out from stored procedure in output parameter.
    Looking forward for Help,
    SE YA
    [email protected]
    [email protected]

    My stored procedure is ...
    *****************Create Table**************************
    Create Table SBG100 ( DESIGN1 NUMBER(10), DESIGN2 NUMBER(10), DESIGN3 NUMBER(30), DESIGNSOA NUMBER(10), DESIGN4 NUMBER(10) );
    INSERT INTO SBG100 values ( 124, 123, 123, 123, 123);
    *****************Create Stored Procedure ***************
    CREATE OR REPLACE PROCEDURE NODE1001(varOutPut OUT LONG) AS
    CURSOR CUR IS
    Select NODE1001.rowid NODE1001 FROM DBDIRECT.SBG100 NODE1001;
    N001DESIGN1 NUMBER(10); N001DESIGN2 NUMBER(10); N001DESIGN3 NUMBER(30);
    N001DESIGNSOA NUMBER(10); N001DESIGN4 NUMBER(10); tempnum NUMBER := 0;
    VarOutPutN2 LONG; VarTemp LONG; i number(10):= 0; ntotal_Rows NUMBER(10) := 0;
    BEGIN
         Select count(1) into ntotal_Rows from DBDIRECT.SBG100;
    FOR REC IN CUR LOOP
    Select NODE1001.DESIGN1, NODE1001.DESIGN2, NODE1001.DESIGN3, NODE1001.DESIGNSOA
    into N001DESIGN1, N001DESIGN2, N001DESIGN3, N001DESIGNSOA
    from DBDIRECT.SBG100 NODE1001 Where NODE1001.ROWID = REC.NODE1001 ;
         varTemp := rpad(2||chr(0),4,' ') || rpad(1||chr(0),4,' ') || rpad(N001DESIGN1||chr(0),8, ' ') || rpad(N001DESIGN2||chr(0),8,' ')
    || rpad(N001DESIGN3||chr(0), 8,' ') || rpad(N001DESIGNSOA||chr(0), 8,' ');
    -- NODE1002(VarOutPutN2, ntotal_Rows - i);
         varOutPut := varOutPut || varTemp || varOutPutN2;
         i := i + 1;
    END LOOP;
    END;
    TO execute above stored procedure n see output data Call this stored procedure.
    *************To Execute above Stored Procedure********
    CREATE OR REPLACE PROCEDURE NMAIN AS
    VAROUTPUT LONG;
    BEGIN
    --dbms_output.enable(50000);
    node1001(varoutput);
    dbms_output.put_line(substr(varoutput,250));
    end;
    *************How to execute all :)******************
    only type exec nmain on SQL prompt. You'll see result.

  • SSRS - Oracle Stored procedure returns no data but does in SQL Developer Sudio

    HI there,
    Stored procedure returns no data when executed on the report but when i execute the stored procedure in Sql Developer it returns required rows.
    Thanks for your help!

    Hi Simon,
    When i test with simple query, i get the data.
    For your convenience, my stored proc looks lyk :
    PROCEDURE pr_REPORT_data(P_STARTDATE IN DATE, P_ENDDATE IN DATE, data_rows OUT T_CURSOR) AS 
    OPEN completed_Reinstatement FOR
      SELECT 
                 value1,.......value5
      FROM table1
    WHERE
        To_Date(createdDate, 'YYYY/MM/DD') BETWEEN To_Date(P_STARTDATE, 'YYY/MM/DD') AND To_Date(P_ENDDATE, 'YYYY/MM/DD');
    END pr_REPORT_data;          
    T_CURSOR is of type cursor which is declared on the package.
    I'm assuming the problem is with date parameters, however i converted the date before passing to
    WHERE clause. 

  • Can I create a Stored Procedure That access data from tables of another servers?

    I'm developing a procedure and within it I'm trying to access another server and make a select into a table that belongs to this another server. When I compile this procedure I have this error message: " PLS-00904: insufficient privilege to access object BC.CADPAP", where BC.CADPAP is the problematic table.
    How can I use more than one connection into an Oracle Stored Procedure?
    How I can access tables of a server from a Stored Procedure since the moment I'm already connected with another server?
    Can I create a Stored Procedure That access data from tables of another servers?

    You need to have a Database Link between two servers. Then you could do execute that statement without any problem. Try to create a database link with the help of
    CREATE DATABASE LINK command. Refer Document for further details

  • MSSQL Stored Procedure has duplicate OUT parameter

    Hi All;
    I am using the WLS MSSQL jdbc driver (mssqlserver4v70rel510sp8) for wls
    5.1 sp 12. The following code generates a duplicate OUT parameter.
    Parameters 4 and 5 are duplicated. I went over the stored procedure in
    ISQL, and the problem is not occurring there. Has anyone seen this sort of
    problem? I noticed this problem does not occur when I have the "?=" in
    front.
    stmt = con.prepareCall("{ ?= call webactivate..ValidatePromoCode(?, ?,
    stmt.registerOutParameter(1, java.sql.Types.INTEGER);
    stmt.setString(2, marketingCode);
    stmt.setString(3, activationData.getRawServiceNumber());
    stmt.registerOutParameter(4, java.sql.Types.VARCHAR);
    stmt.registerOutParameter(5, java.sql.Types.INTEGER);
    stmt.registerOutParameter(6, java.sql.Types.INTEGER);
    stmt.execute();
    Log.putDebug("#1="+stmt.getString(1));
    Log.putDebug("#4="+stmt.getString(4));
    Log.putDebug("#5="+stmt.getString(5));
    Log.putDebug("#6="+stmt.getString(6));
    Paul Rowe

    Thanks Joseph. I was hoping you would get back to me on this. You are the
    king of this newsgroup. Here's what I got, which indicates some type of
    problem on my end:
    Update count = 1
    Update count = 1
    Update count = 1
    Update count = 1
    Update count = 1
    Output status: 4
    Output param 1: 4
    Output param 2: marketingCode activationData.getRawServiceNumber()
    Output param 3: 2
    "Joseph Weinstein" <[email protected]> wrote in message
    news:[email protected]...
    Paul Rowe wrote:
    Hi All;
    I am using the WLS MSSQL jdbc driver (mssqlserver4v70rel510sp8) for
    wls
    5.1 sp 12. The following code generates a duplicate OUT parameter.
    Parameters 4 and 5 are duplicated. I went over the stored procedure in
    ISQL, and the problem is not occurring there. Has anyone seen this sortof
    problem? I noticed this problem does not occur when I have the "?=" in
    front.Hi Paul. Please run this sample program below with the driver you have,and
    let me know the output. it works with the latest driver I have. I get:
    C:\joe\70bugs>java foo
    Update count = 1
    Output status: 4
    Output param 1: marketingCode activationData.getRawServiceNumber()
    Output param 2: 2
    Output param 3: 3
    The code:
    import java.sql.*;
    import java.util.*;
    class foo {
    public static void main(String[] args) throws Exception
    Properties props = new Properties();
    props.put("user", "sa");
    props.put("password", "");
    props.put("server", "natoma");
    try {
    Driver myDriver = (Driver)
    Class.forName("weblogic.jdbc.mssqlserver4.Driver").newInstance();
    Connection con = myDriver.connect("jdbc:weblogic:mssqlserver4",props);
    >
    String proc = "create proc foojoe @bar varchar(60), @qwevarchar(60), "
    + " @asd varchar(60) output, @zxc int output, @ert intoutput "
    + " as select @asd = @bar + @qwe select @zxc = 2 select@ert = 3 "
    + " return 4";
    Statement s = con.createStatement();
    try { s.executeUpdate("drop proc foojoe"); } catch (Exceptionignore){}
    s.executeUpdate(proc);
    CallableStatement stmt = con.prepareCall("{ ?= callfoojoe(?,?,?,?,?) }");
    stmt.registerOutParameter(1, java.sql.Types.INTEGER);
    stmt.setString(2, "marketingCode");
    stmt.setString(3, " activationData.getRawServiceNumber()");
    stmt.registerOutParameter(4, java.sql.Types.VARCHAR);
    stmt.registerOutParameter(5, java.sql.Types.INTEGER);
    stmt.registerOutParameter(6, java.sql.Types.INTEGER);
    stmt.execute();
    while (true) // how to handle any callable statement...
    ResultSet rs = stmt.getResultSet();
    int updateCount = stmt.getUpdateCount();
    // If there are no more results or counts, we're done.
    if (rs == null && updateCount == -1)
    break;
    // Check to see if there is a ResultSet
    if (rs != null) {
    while (rs.next()) {
    System.out.println("Get first resultset col by id:" +rs.getString(1));
    rs.close();
    } // Otherwise, there will be an update count
    else {
    System.out.println("Update count = " + updateCount);
    stmt.getMoreResults();
    // Best to retrieve status and output parameters
    // after all result sets and update counts have been retrieved.
    System.out.println( "Output status: " + stmt.getInt(1));
    System.out.println( "Output param 1: " + stmt.getString(4));
    System.out.println( "Output param 2: " + stmt.getString(5));
    System.out.println( "Output param 3: " + stmt.getString(6));
    catch(Exception e) { e.printStackTrace(); }

  • Calling a stored procedure with an XmlType parameter.

    I am attempting to execute a stored function via a named query. The stored procedure has a single parameter of Oracles 'xmltype', and also returns an xmltype. For example this dummy function
    function testXML(xml_in xmltype) return xmltype is
    begin
    return xml_in;
    end;
    Is it possible to make the named query call with an oracle.xdb.XMLType or oracle.xdb.dom.XDBDocument? I cannot find any examples of this being done. I also want the returning xmltype to be converted into a Java class.
    Another question - will I need to work with a conversion manager to achieve this?

    Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Invalid column typeError Code: 17004
    Call:BEGIN ? := TestPackage.testXML(XML_IN=>?); END;
         bind => [=> RESULT, oracle.xml.parser.v2.XMLDocument@1a64732 => XML_IN]
    Query:DataReadQuery()
         at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:290)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:570)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:442)
         at oracle.toplink.threetier.ServerSession.executeCall(ServerSession.java:453)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:117)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:103)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:174)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeSelect(DatasourceCallQueryMechanism.java:156)
         at oracle.toplink.queryframework.DataReadQuery.executeNonCursor(DataReadQuery.java:118)
         at oracle.toplink.queryframework.DataReadQuery.executeDatabaseQuery(DataReadQuery.java:110)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:603)

  • Stored Procedure for displaying data in Crystal Reports

    Hi I am new to Oracle & Crystal Reports,so can any one please give me sample stored procedure to display data in Crystal report from Oracle by passing rwo input values.

    from site:-
    Crystal Reports will only support the return of a single refcursor from Oracle. Even the latest and greatest version 10 doesn't allow you to return more than one recordset at a time. You could add one more step to your procedure that would join up the output of the multiple refcursors into a PL/SQL table and then fetch the result set out through a single refcursor. That way you are using temporary space that will be cleaned up as soon as the connection is terminated and will only be returning a single refcursor

  • How to execute a stored procedure with an out parameter ?

    Guys I am struggling with executing a stored procedure from sql plus.I mean my stored procedure has 2 input parameter and 1 out put parameter (status of the execution).
    MY_PROCEDURE(p_name in varchar2,p_age in number,p_status out varchar2)
    end my_procedure;
    When I say
    EXECUTE MY_PROCEDURE('manohar','Shetty');
    i get insufficient parameters errors.
    please help.

    EXECUTE isn't a valid PL/SQL construct. It's a SQL*Plus command. You don't want to put any SQL*Plus commands in a PL/SQL block.
    You can always execute a stored procedure purely through PL/SQL
    begin
      my_stored_procedure( x, y, z );
    end;SQL*Plus happens to give you the execute command so you can avoid the begin and end statements.
    Justin

  • How to change stored procedure with Table Valued Parameter

    I am not sure how to change the normal stored procedure with Table Value Parameter.Do I have to create a separate Table or do I have to create a datatype. Can you please help me with this
    ALTER PROCEDURE [dbo].[uspInsertorUpdateINF]
    @dp_id char(32),
    @dv_id char(32),
    @em_number char(12),
    @email varchar(50),
    @emergency_relation char(32),
    @option1 char(16),
    @status char(20),
    @em_id char(35),
    @em_title varchar(64),
    @date_hired datetime
    AS
    BEGIN
    SET NOCOUNT ON;
    MERGE [dbo].[em] AS [Targ]
    USING (VALUES (@dp_id, @dv_id , @em_number, @email, @emergency_relation, @option1, @status, @em_id, @em_title, @date_hired))
    AS [Sourc] (dp_id, dv_id, em_number, email, emergency_relation, option1, status, em_id, em_title, date_hired)
    ON [Targ].em_id = [Sourc].em_id
    WHEN MATCHED THEN
    UPDATE
    SET dp_id = [Sourc].dp_id,
    dv_id = [Sourc].dv_id,
    em_number = [Sourc].em_number,
    email = [Sourc].email,
    emergency_relation = [Sourc].emergency_relation,
    option1 = [Sourc].option1,
    status = [Sourc].status,
    em_title = [Sourc].em_title,
    date_hired = [Sourc].date_hired
    WHEN NOT MATCHED BY TARGET THEN
    INSERT (dp_id, dv_id, em_number, email, emergency_relation, option1, status, em_id, em_title,date_hired)
    VALUES ([Sourc].dp_id, [Sourc].dv_id, [Sourc].em_number, [Sourc].email, [Sourc].emergency_relation, [Sourc].option1, [Sourc].status, [Sourc].em_id, [Sourc].em_title, [Sourc].date_hired);
    END;

    It's not clear how you would change the procedure. But assuming that you want to replace the existing scalar parameters with tabular input, this is how you would do it. You first create a table type:
    CREATE TYPE  Insertor_type AS TABLE
        (dp_id                char(32),
         dv_id                char(32),
        em_number            char(12),
        email                varchar(50),
        emergency_relation   char(32),
        option1              char(16),
        status               char(20),
        em_id                char(35),
        em_title             varchar(64),
        date_hired           datetime)
    Then you change the procedure header:
    ALTER PROCEDURE [dbo].[uspInsertorUpdateINF] @tvp Insertor_type READONLY AS
    And finally you change the USING clause:
       USING (SELECT dp_id, dv_id , em_number, email, emergency_relation, option1, status, em_id, em_title, date_hired
              FROM   @tvp) AS [Sourc] ON [Targ].em_id = [Sourc].em_id
    The rest is fine as it is.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Receiving very large amounts of data via ibrd in Visual Basic

    I am trying to read anything from a single byte up to 2Mb of data back into a Visual Basic program. Until now I have been using something like
    Dim Response as string * 60000
    ibrda hDevice, Response
    which works fine up to the magic 65536ish string size limit, but I want more!
    Ideally reading into a very large byte array would suffice, e.g.
    Dim ByteBuffer(0 To 2000000 - 1) As Byte
    ibrd hDevice, ByteBuffer
    But I cannot find a way to get the gpib-32.dll to accept the ByteBuffer as a destination in Visual Basic, even though ibrd32 is declared in vbib-32.bas as accepting Any type as a destination, and a Long as a count, implying the the 65536 limit doesn't apply for that call.
    It may be possibl
    e to use repeated ibrd calls until one such call fails to fill the buffer, concatenating the results each time, but this seems a crude solution when the DLL would appear to be able to do the job in one go.
    Using ibrdf may work, but would rather not use a file as intermediate storage.
    TIA

    I'm wondering if that # 65536 is a VB cap for string type. Refering to the lang intf,
    Declare Function ibrd32 Lib "Gpib-32.dll" Alias "ibrd" (ByVal ud As Long, sstr As Any, ByVal cnt As Long) As Long
    Sub ibrd(ByVal ud As Integer, buf As String) <---
    Dim cnt As Long
    cnt = CLng(Len(buf))
    Call ibrd32(ud, ByVal buf, cnt)
    isn't buf a string type?

  • Calling Stored Procedure with a DATE input parameter

    Hi. A question about Date input parameters when calling a stored procedure...
    I have a procedure that takes a DATE parameter as input. I would like that DATE value to include a Time element.
    My Application Module method takes an input parameter as java.util.Date (myParamDate) - which will preserve a time element(?).
    However when I create the CallableStatement, I'm trying to set the parameter using setDate like this (for param 5):
                st = getDBTransaction().createCallableStatement("begin cs_my_pck.request_values(?,?,?,?,?,?,?,?); end;", 0);           
                Connection myConn = st.getConnection();
                ArrayDescriptor myArrDesc  =  ArrayDescriptor.createDescriptor("CS_FIELD_TABT", myConn);
                Array sqlParamNameArray = new oracle.sql.ARRAY(myArrDesc, myConn, paramNames.toArray());
                Array sqlParamValueArray = new oracle.sql.ARRAY(myArrDesc, myConn, paramValues.toArray());
                Array sqlFilterNameArray = new oracle.sql.ARRAY(myArrDesc,myConn,filterNames.toArray());
                st.setString(1, repType);
                st.setObject(2, sqlParamNameArray);
                st.setObject(3,sqlParamValueArray);
                st.setObject(4,sqlFilterNameArray);
                java.sql.Date myRepDate = new java.sql.Date(myParamDate.getTime());
                st.setDate(5,myRepDate);
                System.out.println("Report Date = " + myRepDate.toString());
                st.setString(6,repUser);
                st.setString(7,repAttach);
                // set out param
                st.registerOutParameter(8, Types.NUMERIC);
                st.execute();I understand java.sql.Date does NOT include a Time element. But setDate() accepts only a java.sql.Date so my procedure parameter ends up with a zero time element.
    How do I call this procedure retaining the Time element?
    Thanks.

    It includes time element, if you want more precision go with timestamp.
    http://docs.oracle.com/javase/6/docs/api/java/sql/Date.html

  • ORABPEL-11809 - call a stored procedure - error in OUT parameter

    Hi all.
    I have a problem in a BPEL process that calls a stored procedure.
    I create a Partner Link that calls a stored procedure in the database. That procedure returns a type that is a table (is defined as a type of the database).
    When I deploy the process I have the following error:
    <messages>
    - <input>
    - <WC01_Pesquisa_Ut_InputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
    - <InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/IGIF/WC01/PESQUISA_UT/">
    <P_NIR xmlns="">
    165968274
    </P_NIR>
    <P_NOME_COMPLETO xmlns="">
    carla diogo
    </P_NOME_COMPLETO>
    <P_SEXO xmlns="">
    Feminino
    </P_SEXO>
    <P_DATA_NASC xmlns="">
    2007-03-01
    </P_DATA_NASC>
    <P_NATURALIDADE xmlns=""/>
    </InputParameters>
    </part>
    </WC01_Pesquisa_Ut_InputVariable>
    </input>
    - <fault>
    - <remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
    - <part name="code">
    <code>
    17002
    </code>
    </part>
    - <part name="summary">
    <summary>
    file:/oracle/product/10.1.3/SOA/Integration10131/bpel/domains/default/tmp/.bpel_SaudeIdentificarCidadao_5.0_e3768f57d137443e1ba52d4a6d809426.tmp/WC01_Pesquisa_Ut.wsdl [ WC01_Pesquisa_Ut_ptt::WC01_Pesquisa_Ut(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'WC01_Pesquisa_Ut' failed due to: Error registering an out parameter.
    An error occurred when registering parameter PESQUISA_UT as an out parameter of the IGIF.WC01.PESQUISA_UT API. Cause: java.sql.SQLException: Io exception: Connection reset [Caused by: Io exception: Connection reset]
    ; nested exception is:
         ORABPEL-11809
    Error registering an out parameter.
    An error occurred when registering parameter PESQUISA_UT as an out parameter of the IGIF.WC01.PESQUISA_UT API. Cause: java.sql.SQLException: Io exception: Connection reset [Caused by: Io exception: Connection reset]
    Check to ensure that the parameter is a valid IN/OUT or OUT parameter of the API. Contact oracle support if error is not fixable.
    </summary>
    </part>
    - <part name="detail">
    <detail>
    Internal Exception: java.sql.SQLException: Io exception: Connection resetError Code: 17002
    </detail>
    </part>
    </remoteFault>
    </fault>
    </messages>
    The code of the XSD created when I create the partner link is:
    <schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/IGIF/WC01/PESQUISA_UT/" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/IGIF/WC01/PESQUISA_UT/"
    elementFormDefault="unqualified" attributeFormDefault="unqualified">
    <element name="InputParameters">
    <complexType>
    <sequence>
    <element name="P_NIR" type="decimal" db:index="1" db:type="NUMBER" minOccurs="0" nillable="true"/>
    <element name="P_NOME_COMPLETO" type="string" db:index="2" db:type="VARCHAR2" minOccurs="0" nillable="true"/>
    <element name="P_SEXO" type="string" db:index="3" db:type="VARCHAR2" minOccurs="0" nillable="true"/>
    <element name="P_DATA_NASC" type="dateTime" db:index="4" db:type="DATE" minOccurs="0" nillable="true"/>
    <element name="P_NATURALIDADE" type="string" db:index="5" db:type="VARCHAR2" minOccurs="0" nillable="true"/>
    </sequence>
    </complexType>
    </element>
    <element name="OutputParameters">
    <complexType>
    <sequence>
    <element name="PESQUISA_UT" type="db:TABELA_DE_IDS" db:index="0" db:type="Array" minOccurs="0" nillable="true"/>
    </sequence>
    </complexType>
    </element>
    <complexType name="TABELA_DE_IDS">
    <sequence>
    <element name="PESQUISA_UT_ITEM" type="decimal" db:type="NUMBER" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
    </sequence>
    </complexType>
    </schema>
    Any ideia?
    Thanks in advance.
    Carla

    I'd suggest that you turn on xml validation on the bpel boundaries to make sure that the xml being passed to the adapter is valid. You do this by logging in to bpel console, go to Manage Domain, at the bottom of the Configuration tab, set validateXml to true.
    Then see if it is an xml validation issue - in which case you will have to fix your maps to make sure it is valid indeed.
    Assuming your XML is valid and you are still seeing this error, couple of follow up questions:
    - are you using synonyms ?
    -- note that synonyms are not supported completely by the adapter at this time.
    - could you spell out where your types/sp-pkg resides and what are you connecting as at runtime ?
    -- just to keep things simple enough to debug, i'd do everything as just one user and slowly go to a scheme that you desire.
    HTH

  • Sub report using Stored Procedure returns incorrect data

    Post Author: rikleo2001
    CA Forum: Data Connectivity and SQL
    Guys,
    I am using CR 9 in ASP.net application.
    One simple report and one Sub report, sub report is basically linked with Stored procedure accepting one parameter and returns a select query.
    Main report is linked with that sub report using that parameter field.
    Sub report is on demand sub report.
    Now when I execute that main report and click on on demand sub report I am getting Wrong order information.
    Here is out put on main report
    Order 1                                          on demandDetail
    Order 2                                          on demandDetail
    Order 3                                          on demandDetail  
         NOW If I click on Order 3 (On demanddetail link, it displays rondom order details, some time correct on too), I am really stuck and don't know where I am going wrong.
    Please help me to solve this issues.
    Many Thanks

    Post Author: rikleo2001
    CA Forum: Data Connectivity and SQL
    Hi Yangster,
    Thank you so much for your reply.
    On DEMAND Sub report is located in main report, IN DETAIL SECTION
    I am passing Order ID from main report linked to  {?morderid} in subreport under command object, and if I run it in design mode, it works perfectly alright, so problem is isolated to ASP.NET and Crystal report post back method on Crystal report.
    The example I give to you this is a simple example to identify issues in my real application and report.
    My main report contains summary of data base on unique identifier. that summary have 4 differant types of details which has to be on the same report (as Crystal report doesn't provide Nested subreport), so I decided to use 4 subreports on main report and all subreport using Stored procedure command object.(Sub report has it own complex processing requirement to fulfill).
    Please help me with any further ideas? for the sample which I presented to you this is only using one SP on main report with a simple processing.
    Many Thanks

  • Using stored procedures with a timestamp parameter with Delphi  and ADO

    Dear Oracle experts,
    I have a problem concerning using a stored procedure with Delphi.
    I try to use a stored procedure which hast two input parameters ( a integer and a timestamp).
    The timestamp parameter is my problem since I would like to use the "to_timestamp"
    Oracle-function to create the timestamp parameter to be inserted into my procedure.
    If I insert the to_timestamp statement as a adodatetime I have to perform the conversion to the oracle timestamp in my application.
    If I want to use the to_timestamp statement I have to use the ftstring datatype but in that case I get an error because I use a string as input for my procedure were it awaits a timestamp.
    So the problem seems to be that the function call "to_timestamp" is not interpreted if it is transferred through my ADO component.
    Do you know how to use a procedure with Delphi (ADO) with a function as input parameter ?
    Best regards,
    Daniel Wetzler
    P.S. :
    This is the Delphi code to use my Procedure.
    FactsTempDS:=TADODataset.Create(nil);
    Sproc1 := TAdoStoredProc.Create(nil);
    Sproc1.Connection := TDBConnection(strlistConnectionstrings.objects[iConnectionIndex]).Connection;
    Sproc1.ProcedureName := 'ECSPACKAGE.PROCFINDINITIALSWITCHSTATE';
    Sproc1.Parameters.CreateParameter ('SwitchID',ftInteger,pdinput,0,0);
    //Sproc1.Parameters.CreateParameter ('StartTime',ftdatetime,pdinput,50,0);
    Sproc1.Parameters.CreateParameter ('StartTime',ftString,pdinput,50,0);
    Sproc1.Parameters.Findparam('SwitchID').value:=SwitchID;
    Sproc1.Parameters.FindParam('StartTime').Value:= 'to_timestamp(''2005/12/30 19:36:21'', ''YYYY/MM/DD HH:MI:SS'')';
    Sproc1.CursorType := ctKeyset;
    Sproc1.ExecuteOptions:=[];
    Sproc1.Open;
    Sproc1.Connection := nil;
    FactsTempDS.Recordset:= sproc1.Recordset;
    if FactsTempDS.RecordCount=0
    then raise Exception.Create('No line switch variable found for switch '+IntToStr(SwitchID)+' before starttime. Check BDE dump filter.')

    I have my entity manager setup in a singleton.
    I'm finding it's costly to generate the emf, but if I don't close the em (enitity manager) and emf (entity manager factory) my open cursor count climbs until I exceed the max number of open cursors on the database (11g RAC)
    I'm committing the connection, and uow, and closing the em at the end of each call.
    But until I close the emf, the open cursors aren't released.
    TransactionhistoryPkg tranPkg = new TransactionhistoryPkg(conn); //Class created over database package via JPublisher
    tranPkg.transactionhistoryInsSp(insertTrans.getCardId()); // executes db package
    tranPkg.closeConnection();
    conn.commit();
    uow.commit();
    uow.getAccessor().decrementCallCount();
    em.close();
    Am I missing something really obvious here??
    btw - I found this link helpful in troubleshooting the max cursors issue: https://support.bea.com/application_content/product_portlets/support_patterns/wls/InvestigatingORA-1000MaximumOpenCursorsExceededPattern.html

  • How to write stored procedure to spool data into file

    Hi ,
    We get differnt excel sheets of differnt products.
    We upload data from excel sheet to database . After uploading data , I run Preprossor (sql script) to check the data
    This preprocessor script contains several select statements that query different tables in database .the output is spooled into a cvs file .
    I need to change this script into a stored procedure and spool the output to cvs file.
    File spooling should be done inside the stored procedure so that if I call this stored procedure from java program ,or any concurrent program,its output is .cvs file and in parameter should be productname.
    But inside the stored procedure , we cannot spool the data to some .cvs file . Is any way.I do not want to spool to file when calling.It should be inside stored procedure.
    Or do I need to create a table and insert all the select statements output into it .
    Here is the sample preprocessor script.
    spool Graco_Product.csv
    set head off
    set feedback off
    set Pagesize 100
    SELECT '1. EVERY ASSEMBLY GROUP ADDED IN sys_PRODUCT TABLE MUST HAVE AT LEAST ONE ITEM IN WOC_ASSEMBLY_ITEM'
         FROM DUAL;
    SELECT 'ASSEMBLY_GROUP_NAME'
         FROM DUAL;
    SELECT
         assembly_group_name
         FROM association
         WHERE product_model_name = 'Graco_Product'
         AND assembly_group_name NOT IN (SELECT DISTINCT assembly_group_name FROM woc_assembly_item);
    SELECT '2. A RULE SHOULD HAVE AT LEAST ONE EXPRESSION FOR ITS ACTION SIDE.'
         FROM DUAL;
    SELECT 'RELATION_ID , RELATION_TYPE'
         FROM DUAL;
    SELECT wr.Relation_ID                    ||','||
         wr.Relation_Type                    
         FROM WOC_Relation wr
         WHERE NOT EXISTS (SELECT 'X' FROM WOC_Relation_Expression wre
    WHERE wre.Relation_Side = 'Action'
    AND wr.Relation_ID = wre.Relation_ID)
         AND wr.Relation_Type NOT IN ( 'Rule Warning','Rule Resource','Rule Default');
    SELECT '3. PROPERTIES USED IN RULES SHOULD EXIST IN WOC_PROPERTY_MASTER -- EXP_LHS_VALUE'
         FROM DUAL;
    SELECT
         'RELATION_OWNER,EXP_LHS_OPERAND,RELATION_SIDE,RELATION_ID,EXP_LHS_VALUE,RELATION_TYPE'     
         FROM DUAL;
    SELECT
         b.relation_owner               ||','||
         a.exp_lhs_operand               ||','||
         a.relation_side                    ||','||
         a.relation_id                    ||','||
         a.exp_lhs_value                    ||','||
         b.relation_type
         FROM woc_relation_expression a, woc_relation b
         WHERE a.exp_lhs_value IS NOT NULL
         AND a.exp_lhs_value_type = 'Property'
         AND a.exp_lhs_value NOT IN (SELECT property_name FROM woc_property)
         AND b.product_model_name = 'Graco_Product'
         AND a.relation_id = b.relation_id;
    SELECT '--------------------------------------------------------------------------------'
    from dual;
    spool off
    set head on
    set feedback on

    High level description
    Full documentation
    Note that the UTL_ and DBMS_ packages are all covered in the PL/SQL Packages and Types Reference.
    You may also want to read up on the CREATE DIRECTORY statement, which lets you refer to an actual OS directory (which you create separately) via a database object.

Maybe you are looking for

  • How to disable the Save button For a pdf?

    Hi, I have a requirement that when you open the livecycle developed pdf, the Save option available in the toolbar (Save As icon) and File menu of the Reader should be disabled. A button will be provided in the form separately to provide the Save func

  • Lightroom hangs when attempting to import RAW files from D750

    Hi guys, I purchased lightroom 5 sometime back to install on multiple platforms. Recently did an update on my macbook and it was able to read the NEF files from D750. However when I installed lightroom 5 on my iMac, the prog keeps hanging when I atte

  • Fan noise (not moo or whine)

    I have a new mbp, the second one, both whined. On this one while moving my laptop I can listen to the fan scratching against something. Should I worry about this and get it repaired now, I need my laptop a lot and I can't afford to be without it. By

  • Jdeveloper 10g + JUnit

    Hi everybody my problem is: I'm using Jdeveloper 10g, JSF, ADF Faces. I'm trying to do a test case using JUnit with JDeveloper but the method corresponding to test case requiere an objects javax.faces.context.ExternalContext; javax.faces.context.Face

  • Configuration mail notification in dbconsole (Windows)

    Hi, I have 10.2.0.4 db running on Windows 2003/64 Dbconsole also has been installed. I can not define password for user mail account on the SMTP server. I can define only user name. My question is how I can configure mail server/account on the SMTP s