Passing Variable Number of Parameters to Cobol Stored Procedure

Hi. I have a web front end that needs to access several different tables via Cobol stored procedures. It seems simple enough to call the stored procedures straight away (DAO Pattern perhaps?) but my boss is insistent on having an intermediate Cobol program that decides which table to access. I think he at a bigger picture than I can see.
The problem lies in the number of parameters that need to be passed to the stored procedures; some need 3, others needs 5, a few need 4. The only two solutions that I can think of are to pass EVERYTHING (we're talking 50 parameters or so) to the intermediate stored procedure and then pulling only what is needed from that data set to access the desired table. Solution number two involves passing everything to a temp table and then pulling what is needed from it. The former solution seems a little cleaner but still involves passing a lot of parameters. If Cobol could handle some sort of dynamic memory allocation (Vector) there seems to be a possible solution there. Though, as far as I know, that isn't possible.
Any ideas are much appreciated.
Thanks in advance,
Chris

Hi Saurabh,
The method in which stored procedures are called on form submit is something as follows.
Let us take your scenario of a form which has multiple checkboxes and a submit button. On clicking the submit button, this form data is submitted using either get or post. The form's submit action invokes a procedure.
The HTML form code will look something like this..
htp.formOpen( curl => 'URL /myProcedure',
cmethod => 'post' );
htp.formCheckbox( cname => 'myCheckbox'
cvalue => 'A');
htp.formCheckbox( cname => 'myCheckbox'
cvalue => 'B');
htp.formCheckbox( cname => 'myCheckbox'
cvalue => 'C');
htp.formSubmit( cname => 'myButton',
cvalue => 'OK');
Now, whenever the submit button is clicked, all these form values are passed to our stored procedure 'myProcedure'.
"myProcedure" looks something like this.
procedure myProcedure
myCheckbox IN sys.owa_util.vc_arr,
myButton IN VARCHAR2
is
begin
end myProcedure;
The point to be noted here is that the name of the variable being passed in the procedure is the same as the name of the HTML element being created in the HTML form. So, there is a direct mapping between the elements in the HTML form and the procedure parameters.
Another noteworthy point is that since you have multiple checkboxes in your HTML form, it is impractical to name all the checkboxes differently and then pass those many parameters to your procedure (Imagine a scenario where there are a hundred check-boxes in an HTML form!). So portal allows you to give the same name (cname) to all the checkboxes in your HTML form, and if multiple checkboxes are checked, it will return all the checkbox values in an array (Note the usage of "myCheckbox IN sys.owa_util.vc_arr" in myProcedure).
You can check out this link for more information.
Re: retrieving data from fields
Thanks,
Ashish.

Similar Messages

  • Passing variable number of arguments in a stored procedure

    Hi Team,
    i am facing a problem. I have a dynamic form which contains some checkboxes. The number of checkboxes are dynamically generated on querying the database. On the form submission i want to call a stored procedure that will update the values in the database. i want to know that is there any way to handle variable number of arguments in the stored procedure or can i get the variables through some session context and use it in my stored procedure.
    Any help is greatly appreciated.
    Thanks&Regards
    Saurabh Jain

    Hi Saurabh,
    The method in which stored procedures are called on form submit is something as follows.
    Let us take your scenario of a form which has multiple checkboxes and a submit button. On clicking the submit button, this form data is submitted using either get or post. The form's submit action invokes a procedure.
    The HTML form code will look something like this..
    htp.formOpen( curl => 'URL /myProcedure',
    cmethod => 'post' );
    htp.formCheckbox( cname => 'myCheckbox'
    cvalue => 'A');
    htp.formCheckbox( cname => 'myCheckbox'
    cvalue => 'B');
    htp.formCheckbox( cname => 'myCheckbox'
    cvalue => 'C');
    htp.formSubmit( cname => 'myButton',
    cvalue => 'OK');
    Now, whenever the submit button is clicked, all these form values are passed to our stored procedure 'myProcedure'.
    "myProcedure" looks something like this.
    procedure myProcedure
    myCheckbox IN sys.owa_util.vc_arr,
    myButton IN VARCHAR2
    is
    begin
    end myProcedure;
    The point to be noted here is that the name of the variable being passed in the procedure is the same as the name of the HTML element being created in the HTML form. So, there is a direct mapping between the elements in the HTML form and the procedure parameters.
    Another noteworthy point is that since you have multiple checkboxes in your HTML form, it is impractical to name all the checkboxes differently and then pass those many parameters to your procedure (Imagine a scenario where there are a hundred check-boxes in an HTML form!). So portal allows you to give the same name (cname) to all the checkboxes in your HTML form, and if multiple checkboxes are checked, it will return all the checkbox values in an array (Note the usage of "myCheckbox IN sys.owa_util.vc_arr" in myProcedure).
    You can check out this link for more information.
    Re: retrieving data from fields
    Thanks,
    Ashish.

  • How to pass variable number of parameters to a FORM.

    Hi,
    What is the correct syntax to pass variable number of parameters to a subroutine?
    PERFORM TEST TABLES BRETURN USING TEST_NAME CHANGING MY_OUTPUT.
    FORM TEST TABLES RETURN STRUCTURE BAPIRET2
              ITAB STRUCTURE ITABLE_LINE OPTIONAL
              USING VALUE(NAME) TYPE STRING
              CHANGING VALUE(OUTPUT) TYPE STRING.
    The above code does not work. How can we specify an optional parameter?
    Thanks and Regards,
    Sheetal
    Message was edited by: Sheetal Pisolkar

    Hi,
    I am trying to use a subroutine instead of function.A FUNCTION understands optional keyword.
    How can this work for a FORM?
    CALL FUNCTION 'TEST'
         EXPORTING
              MY_OUTPUT = 'output'
         IMPORTING
              TEST_NAME = 'mytest'.     
    FUNCTION TEST
    *     EXPORTING
    *          VALUE(OUTPUT) TYPE STRING
    *     IMPORTING
    *          VALUE(NAME) TYPE STRING
    *     TABLES
    *          RETURN STRUCTURE BAPIRET2 OPTIONAL
    *          ITAB STRUCTURE ITABLE_LINE OPTIONAL          
    ENDFUNCTION.
    PERFORM TEST USING TEST_NAME CHANGING MY_OUTPUT.
    FORM TEST TABLES RETURN STRUCTURE BAPIRET2 OPTIONAL
    ITAB STRUCTURE ITABLE_LINE OPTIONAL
    USING VALUE(NAME) TYPE STRING
    CHANGING VALUE(OUTPUT) TYPE STRING.
    ENDFORM.
    Is this be possible?
    Thanks
    Sheetal.

  • Maximum number of parameters sent to stored procedure

    I have a web form from where I insert data to Oracle. There are at least 20 fileds on the form. For INSERT I want to use Stored Procedure. But in this case for VALUES section of the INSERT statement I need to send that many- in this case 20 parameters. Is this normal for a procedure to receive 20 parameters? If it's not, then what way should I follow to perform this? I know technically there's no problem but is this normal programming or database managementwise? I think this is the basic thing all web developer do all the time.

    He's got 20 fields on a web form and you think using SQL*Loader is a good idea ?because I do not believe that he has to enter these fields once time.
    You want him to write the values to a flat file, generate a control file, then invoke SQL*Loader ?I know that the first time you create all those files can be a problem, but when you have all , the next times its just change the information into flat file.
    Did you read the question ?Yes, i did
    It's only my opinion, He can accept it or not.
    any other question not related to help him to solve his problem?

  • Variable number of parameters to procedure

    I have a requirement to pass variable number of parameters for an attribute, to a stored procedure.
    example:
    procedure getSum(country_code IN varchar2, sum OUT number)
    Inside the procedure, I am currently
    writing SQL as
    where eligible_code in (country_code).
    This is ok when I pass just one code.
    However I need to deal with n number of
    country codes at a given time.
    i.e. if I want to pass 3 country codes
    as a concatinated string say "A-B-C"
    where A, B, C are 3 different codes,
    how do I decode them into a
    meaning full
    where eligible_code in ('A', 'B', 'C')
    Or is there any other way of dealing
    with this kind of situation.
    The bottom line is I must have a stored
    procedure, that takes parameter(s).
    Any input/suggestion is highly appreciated.

    Please try the following, substituting the appropriate table name for your_table and the appropriate column name for eligible_code, then see if you can incorporate some of it into your procedure. Please let me know if it works for you or not.
    SQL> EDIT getsum
    CREATE OR REPLACE PROCEDURE getsum
    (country_code IN VARCHAR2,
    p_sum OUT NUMBER)
    AS
    v_country_codes VARCHAR2 (300);
    v_sum NUMBER := 0;
    v_sql_statement VARCHAR2 (3000);
    v_sql_syntax VARCHAR2 (30000);
    cursor_name INTEGER;
    ignore INTEGER;
    BEGIN
    v_country_codes := REPLACE (country_code, '-', ''',''');
    v_sql_statement := ' SELECT COUNT (*)
    INTO :v_sum
    FROM your_table
    WHERE eligible_code IN (''' | | v_country_codes | | ''');';
    v_sql_syntax := 'BEGIN '| | v_sql_statement | |' END;';
    cursor_name := DBMS_SQL.OPEN_CURSOR;
    DBMS_SQL.PARSE (cursor_name, v_sql_syntax, DBMS_SQL.NATIVE);
    DBMS_SQL.BIND_VARIABLE (cursor_name, ':v_sum', v_sum);
    ignore := DBMS_SQL.EXECUTE (cursor_name);
    DBMS_SQL.VARIABLE_VALUE (cursor_name, ':v_sum', v_sum);
    DBMS_SQL.CLOSE_CURSOR (cursor_name);
    p_sum := v_sum;
    END getsum;
    Save the file.
    SQL> START getsum
    Procedure created.
    SQL> VARIABLE g_sum NUMBER
    SQL> EXEC getsum ('A-B-C', :g_sum)
    PL/SQL procedure successfully completed.
    SQL> PRINT g_sum
    G_SUM
    3
    null

  • Variable number of parameters in a procedure

    Hello !
    I have a form in a procedure with dynamic inputs type "checkbox" (one checkbox by record of a table).
    The action of the form is another procedure. There is a variable number of parameters (depending on checked inputs).
    How can I do for retreiving these variable data within a single variable in my second procedure ?
    Thanks for help and sample
    null

    What u can do is use Javascript and pass all the selected checkbox Ids as a dilimited string..which u can read in second procedure and can perform appropriate action. for example if you have check box named as chk1,chk2,chk3,chk4 n so on..
    now if chk1,chk3,chk4 are checked then pass this string in the hidden field "1|3|4"which is a |(pipe) delimited string..

  • Sequence Parameters: Can I use variable number of parameters?

    Can I create a sequence that has a variable number of parameters?
    If not, Can I pass an array of objects as a paramater?
    In the sequence code:
    for (i=0; i< Parameters.Params.GetNumElements(); i++) {
    object o = Parameters.Params[i];
    // Do something with o
    In the above case, can I call the sequence by putting a "new object[] {(double(2.0)}" as the parameter value?
    For example:
    call VarParams
    Params = PropertyObject.SetPropertyObject (Engine.NewPropertyObject (valueType, asArray, typeName, options))

    Not only can you pass an array of different sizes but you can also make a parameter an empty container and fill it with any container.  The problem is you have to access it correctly within the subsequence.  I can see a practical use for the Array but not really for the container.
    Your last question regarding creating params dynamically: I would have a local variable that is in the Value for the parameter and then just change the local to what you want in the PreExpression.
    Hope this helps,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Passing DATE parameters to Oracle Stored Procedures using ADO

    Does anyone know how can I pass a date parameter to an Oracle
    Stored Procedure? The IN parameter of the procedure is of type
    DATE and the ADO parameter is of type DBDate (I've tried Date
    and DBTimeStamp,too). The execution freezes at "Cmd.Execute".
    Can anyone suggest a solution?
    Thanx for any tips

    As far as I know the documentation on CR & stored procedures says that the REF CURSOR has to be a strongly bound one.
    Could you go into a little more detail? Do you mean I should put a multi-valued parameter into a REF CURSOR? Can you post some code snippets here?

  • StoredProcedureCall with IN OUT Parameters order in Stored Procedure

    Refer to the Toplink documentID:Note 224269.1 - Using IN, OUT and INOUT parameters with StoreProcedureCall. This document can be download from OracleMetaLink:
    http://www.oracle.com/support/metalink/index.html
    I followed the sample code in this document to write a test case for one of complicated PL/SQL codes. The test case showed wrong results for IN/OUT and OUT parameters.
    At the end of the document above, I found this paragraph
    " Check the ordering of the arguments to make sure that they are in the following sequence:
    All 'IN' parameters, All 'OUT' parameters and then all 'INOUT' parameters.
    Your stored procedure must be set up the same way, since this is how values will be passed to it. This is the way in which TopLink stored procedure calls have been designed and implemented. "
    The order of our PL/SQL codes is IN, IN/OUT and OUT. We are not allowed to change our PL/SQL codes because they are currently used in production environment. We do not want to create another versions of PL/SQL codes to comply with IN, OUT, IN/OUT parameter order mentioned above.
    Do you have any work around solution?
    Dennis Nguyen
    LA County Sheriff IT

    I tried a simple example using named parameters and it worked in 9.0.4:
    CREATE OR REPLACE PROCEDURE
    "TEST_904"."STOREDPROCEDURE_INOUT_OUT_IN" (
         P_INOUT IN OUT NUMBER,
         P_OUT OUT NUMBER,
         P_IN NUMBER) AS
    BEGIN
    P_OUT := P_INOUT;
    P_INOUT := P_IN;
    END;
    public void storedProcedureOutInoutInTest() {
         System.out.println("storedProcedureOutInoutInTest");
        StoredProcedureCall call = new StoredProcedureCall();
        call.setProcedureName("STOREDPROCEDURE_INOUT_OUT_IN");
        call.addNamedArgument("P_IN");
        call.addNamedOutputArgument("P_OUT", "P_OUT", Integer.class);
        call.addNamedInOutputArgument("P_INOUT", "P_INOUT", "P_INOUT", Integer.class);
        call.setUsesBinding(true);
        DataReadQuery query = new DataReadQuery();
        query.setCall(call);
        query.addArgument("P_IN");
        query.addArgument("P_INOUT");
        Vector args = new Vector(2);
        args.add(new Integer(1));
        args.add(new Integer(2));
        Object result =  session.executeQuery(query, args);
        Map map = (Map)((Vector)result).firstElement();
        Integer result_p_inout = (Integer)map.get("P_INOUT");
        Integer result_p_out = (Integer)map.get("P_OUT");
         System.out.println("P_INOUT = " +  result_p_inout);
         System.out.println("P_OUT = " +  result_p_out);
    }Result:
    P_INOUT = 1
    P_OUT = 2

  • Pass a null value to a JDBC stored procedure call?

    pass a null value to a JDBC stored procedure call? Is this even possible? My DBA gave me a procedure to call that sometimes requires a null value. I don't think this is even possible.

    do you mind tell me how to resolve your problem?i using the setnull method,but it doesn't work.

  • Pass a jdbc resultset in to a Stored Procedure

    Any answer to the following question would be highly appreciated:
    How can we pass a jdbc resultset in to a Stored Procedure?
    Thanks.

    You could use Oracle's ANYDATASET type or declare schema TYPEs to support passing the data in a known structure. See "Working with Oracle Collections" in the "JDBC Developer's Guide and Reference" on technet.

  • Is it possible to pass TABLE as the output parameter in stored procedure

    Hey Experts,
      Is it possible to pass TABLE as the output parameter in stored procedure.
    eg
    create procedure spGetData
    @tableName as TABLE(intValue INT NOT NUL)
    as 

    You can use OPENQUERY or OPENROWSET, as mentioned above, to make stored procedure results table like. There are
    some limitations with these methods:
    http://technet.microsoft.com/en-us/library/ms188427.aspx
    In OPENQUERY this-sql-server-instance can be used instead of a linked server name. It requires setting data accces server option:
    exec sp_serveroption @server = 'PRODSVR\SQL2012'
    ,@optname = 'DATA ACCESS'
    ,@optvalue = 'TRUE'
    LINK: http://www.sqlusa.com/bestpractices/select-into/
    Kalman Toth Database & OLAP Architect
    SELECT Video Tutorials 4 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Passing large number of parameters

    In chapter 6 of the reports 6i documentation it states that one of the advantages of using a ref cursor is to "avoid the use of lexical parameters in your reports". I am not clear how it does this. Can anyone explain how this would work?
    In my application, I would like to print an exception report (ie use run_report) when an item in the base report exceeds a threshold amount. I would rather not pass all the subtotal values, as that would require passing a large number of parameters to the exception report. I can do it, but it seems like there should be an easier way. Passing a parameter of type RECORD would do it, but isn't allowed, right?
    null

    1. In some cases, you can avoid the use of lexical parameters in your reports
    with "static" ref cursor.
    Example for "static" ref cursor:
    1.1 Stored package
    CREATE OR REPLACE PACKAGE report_static IS
    TYPE type_ref_cur_sta IS REF CURSOR RETURN dept%ROWTYPE;
    FUNCTION func_sta (p_order_by VARCHAR2) RETURN type_ref_cur_sta;
    END;
    CREATE OR REPLACE PACKAGE BODY report_static IS
    FUNCTION func_sta (p_order_by VARCHAR2) RETURN type_ref_cur_sta IS
    ref_cur_sta type_ref_cur_sta;
    BEGIN
    IF p_order_by = 'dname' THEN
    OPEN ref_cur_sta FOR
    SELECT * FROM dept ORDER BY dname;
    ELSE
    OPEN ref_cur_sta FOR
    SELECT * FROM dept ORDER BY deptno;
    END IF;
    RETURN ref_cur_sta;
    END;
    END;
    1.2 Query PL/SQL in Reports
    function QR_1RefCurQuery return report_static.type_ref_cur_sta is
    begin
    return report_static.func_sta (:p_order_by);
    end;
    2. But if you need (for example) dynamic where, you (practically)
    can't use "static" ref cursor. In this case, you can use "dynamic" ref cursor
    (available from Oracle 8.1.5).
    Example for "dynamic" ref cursor (note that Reports need
    "static" ref cursor type for building Report Layout):
    2.1 Stored package
    CREATE OR REPLACE PACKAGE report_dynamic IS
    TYPE type_ref_cur_sta IS REF CURSOR RETURN dept%ROWTYPE; -- for Report Layout only
    TYPE type_ref_cur_dyn IS REF CURSOR;
    FUNCTION func_dyn (p_where VARCHAR2) RETURN type_ref_cur_dyn;
    END;
    CREATE OR REPLACE PACKAGE BODY report_dynamic IS
    FUNCTION func_dyn (p_where VARCHAR2) RETURN type_ref_cur_dyn IS
    ref_cur_dyn type_ref_cur_dyn;
    BEGIN
    OPEN ref_cur_dyn FOR
    'SELECT * FROM dept WHERE ' &#0124; &#0124; NVL (p_where, '1 = 1');
    RETURN ref_cur_dyn;
    END;
    END;
    2.2 Query PL/SQL in Reports
    function QR_1RefCurQuery return report_dynamic.type_ref_cur_sta is
    begin
    return report_dynamic.func_dyn (:p_where);
    end;
    Regards

  • Passing parameters to oracle stored procedure in business objects universe

    Hello,
    Wanted to create a web intelligence usind oracle stored procedure.
    Create the  following SP
    create or replace procedure proc_name1
        proc_freq in number,
        proc_cur1 in out sys_refcursor
    as
    begin
        INSERT INTO
                cc    VALUES
                ( 'Frequency Value = ' || proc_freq, SYSDATE) ;
        COMMIT ;   
        --daily
            if(proc_freq = 2) then
            open proc_cur1 for SELECT
                        EVENT_DATE
                    FROM rqm_mapsigng_dly_stats;
            end if;
    end;
    tried using the above SP in universe, it is needed to pass the parameter for proc_freq, when i pass value 2 , in oracle it is passed as 0(is being traced in rqm_checkpoint  table)
    Hence the table cannot be inserted in the universe.
    Can anyone tell why the value is not being passed correctly

    I believe when you're doing it with an insert, you're saying "execute this insert statement a bunch of times, here's all the values in advance", which is different than passing an array to a stored procedure where you want it to execute once.
    Oracle's ODBC driver doesnt support Associative Arrays (aka index-by tables).
    Hope it helps,
    Greg

  • ERROR WHILE INSERTING BLOBS AS PARAMETERS OF EXISTING STORED PROCEDURE

    I have 2 simple tables to keep large application data (as XMLDOCUMENT in one table and BLOB in another):
    SQL> desc bindata_tbl;
    Name Null? Type
    BDATA_ID NOT NULL NUMBER(10)
    BDATA NOT NULL BLOB
    SQL> desc metadata_tbl;
    Name Null? Type
    MDATA_ID NOT NULL NUMBER(10)
    MDATA NOT NULL SYS.XMLTYPE
    and stored preocedure to input new data into those tables:
    "SP_TEST_BIN_META_DATA"
    i_MetaData in METADATA_TBL.MDATA%TYPE,
    i_BinData in BINDATA_TBL.BDATA%TYPE
    as
    begin
    if i_MetaData is not null then
    insert into METADATA_TBL (MDATA_ID, MDATA)
    values (METADATA_SEQ.nextval, i_MetaData);
    end if;
    if i_BinData is not null then
    insert into BINDATA_TBL (BDATA_ID, BDATA)
    values (BINDATA_SEQ.nextval, i_BinData);
    end if;
    COMMIT;
    -- Handle exceptions
    EXCEPTION
    WHEN OTHERS THEN
    ROLLBACK;
    RAISE;
    end;
    I communicate with database from .Net application using "Oracle.DataAccess 10.1.0.200 (Runtime version v1.0.3705)" component.
    Following procesure is a [simplified] examlple of the code I use, which demonstrates the errors while inserting XMLDOCUMENT and BLOB values simultaneously.
    In my application those should be quite big objects (~200 K XML and ~5-25M binary image data), but following sample keeps failing even with very small-sized objects:
    Line Number
    1          private void PureTest()
    2          {
    3               OracleConnection conn = null;
    4               OracleTransaction tx = null;
    5               OracleCommand command = null;
    6
    7               try
    8               {
    9                    // Open connection
    10                    string strConn = "Data Source=AthenaWf; User ID=AthenaWf; Password=Poseidon";
    11                    conn = new OracleConnection( strConn );
    12                    conn.Open();
    13
    14                    // Begin transaction (not sure if really needed)
    15                    tx = conn.BeginTransaction();
    16
    17                    // Create command
    18                    string strSql = "SP_TEST_BIN_META_DATA";
    19                    command = new OracleCommand();
    20                    command.Connection = conn;
    21                    command.CommandText = strSql;
    22                    command.CommandType = CommandType.StoredProcedure;
    23
    24                    // Create parameters
    25                    // 1) XmlType parameter
    26                    string strXml = "<?xml version=\"1.0\"?><configuration testValue=\"123456789\"/>";
    27                    XmlDocument xmlDoc = new XmlDocument();
    28                    xmlDoc.LoadXml( strXml );
    29                    OracleXmlType oraXml = new OracleXmlType( conn, xmlDoc );
    30                    //oraXml = null;
    31                    //
    32                    OracleParameter xmlPrm = new OracleParameter();
    33                    xmlPrm.ParameterName = "i_MetaData";
    34                    xmlPrm.Direction = ParameterDirection.Input;
    35                    xmlPrm.OracleDbType = OracleDbType.XmlType;
    36                    xmlPrm.Value = oraXml;
    37                    command.Parameters.Add( xmlPrm );
    38
    39                    // 2) Blob type
    40                    byte[] buf = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
    41                    OracleBlob oraBlob = new OracleBlob( conn, true );
    42                    //oraBlob.Write( buf, 0, buf.Length );
    43                    oraBlob = null;
    44                    //
    45                    OracleParameter blobPrm = new OracleParameter();
    46                    blobPrm.ParameterName = "i_BinData";
    47                    blobPrm.Direction = ParameterDirection.Input;
    48                    blobPrm.OracleDbType = OracleDbType.Blob;
    49                    blobPrm.Value = oraBlob;
    50                    command.Parameters.Add( blobPrm );
    51
    52
    53                    // Execute command finally
    54                    command.ExecuteNonQuery();
    55                    tx.Commit();
    56               }
    57               catch( Exception ex )
    58               {
    59                    // Clean-up
    60                    if( command != null )
    61                    {
    62                         command.Dispose();
    63                    }
    64                    if( tx != null )
    65                    {
    66                         tx.Dispose();
    67                    }
    68                    if( conn != null )
    69                    {
    70                         conn.Dispose();
    71                    }
    72
    73                    // Display error message
    74                    MessageBox.Show( ex.Message, "Error" );
    75               }
    76          }
    If I try insert only XMLDOCUMENT object (lines 30, 42 are commented out, 43 IS NOT) - everything is OK.
    If I try to insert only BLOB object (lines 30, 42 are NOT COMMENTED OUT, line 43 is commented out) - everything is OK again.
    If I try to insert them both having some values (lines 30, 43 are commented out, 42 is not commented out) - it fails right on "command.ExecuteNonQuery();" (line 54)
    with the following exception:
    "ORA-21500: internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%]".
    Even when I nullify oraBlob before assigning it to OracleParameter value (line 30 is commented out, line 42 and 43 are not) I have the same exception.
    XMLDOCUMENT and DLOB data logically are very coupled objects (in my application), so I really want to insert them simultaneously in one stored procedure in transactional way.
    Is it bug of drivers, server, .net environment, or I miss something in implementation?
    PS. In some articles on Oracle web and in MSDN site I found a mention about necessity of wrapping all write/update operations in a transaction, while working with temporary LOBs. I use it here, but it does not look like changing anything.

    Hello,
    I tested your code with the 10.1.0.4.0 ODP and 10.1.0.4.0 Client and it worked fine.
    Can you please apply the 10.1.0.4.0 patches for both ODP and client to see if this resolves the issue for you.
    Here is the output from the same execution of the ODP application you provided as a testcase. These rows were inserted at the same time when I executed the application and passed the data as parameters to the SP you provided.
    Results of Testing with 10.1.0.4.0
    ==========================
    SQL> select count(*) from BINDATA_TBL
    2 ;
    COUNT(*)
    1
    SQL> select count(*) from METADATA_TBL;
    COUNT(*)
    1
    SQL> select dbms_lob.getlength(bdata) from BINDATA_TBL;
    DBMS_LOB.GETLENGTH(BDATA)
    10
    SQL> select mdata from METADATA_TBL;
    MDATA
    <?xml version="1.0"?><configuration testValue="123456789" />

Maybe you are looking for

  • How do you count the amount of times a button is clicked?

    Heres my code: public void buttonClicked(JButton buttonzilla){ if(buttonzilla == startButton){ while(i < 7){ story.append("\n" + "\n" + abc); i++; However, when i click the button once, it displays all elements in the array, however, im trying to get

  • Google Chrome Search-bar Lag?

    I have the new 2015 XPS 13 - just got it 2 days ago, but I noticed while I was using google chrome that when I was typing things into the search bar there was a slight lag and for a split second it'll show very zoomed in, low resolution search result

  • I recently installed an Add-On to my Safe Mode Firfox. Now it won't let me open new tabs. Why?

    I just added the french dictionary and now I can't open new tabs. I can right-click and open links in new tabs, bu tI can't open blank ones.

  • 32Bit Eclipse, 32Bit JRockit, 64Bit Windows OS - Maximum  Heap Space.

    Hi: My 32Bit Eclipse application tends to run out of heap space on big files. I have been using Sun JRE 6. JVM. Using the Sun JRE 6 JVM the maximum heap size I can achieve is 1.3GB My machine has 8GB of physical memory. I'm wondering if there is any

  • Ios 5 can't connect to wi fi

    I recently updated my iPod touch to ios 5. Took forever. I used to be able to connect real easy to any wifi. Now at wifi locations it is hit and miss if I can connect to the web at all. Anyone else having this issue. I'm at the same wifi locals I eas