Javascript based on PL/SQL function.

Hey all,
I'm developing an application with Apex and have run into a problem.
I have a form page with the standard create, delete and cancel buttons. I need to be able to click the Create button, which will run a PL/SQL query, and based on the return of the function, either just continue the Insert to the table, or generate a popup warning, and then complete the table insert.
I was thinking of having a Process that ran the javascript, and was conditional on the PL/SQL query, however i haven't had much luck.
Any help appreciated.
Thanks,
Brett Crowley.

Hello Brett,
>> I was thinking of having a Process that ran the javascript, and was conditional on the PL/SQL query, however i haven't had much luck.
APEX Processes are server-side resources, while JavaScript is a client-side resource. As such, you can’t invoke JavaScript code from within a PL/SQL code. However, the reverse direction – invoking PL/SQL code from a JavaScript code – is possible by using AJAX. In general, using AJAX allows you to call to an APEX on-demand PL/SQL (application) process, which in turn can return a result to the calling JavaScript code. In this point, based on the returned result, you can decide whether to issue an alert box or (programmatically) submit the page for further processing.
This forum includes many example of using AJAX, and I believe that the following article can also be a helpful starting point.
http://www.packtpub.com/article/ajax-implementation-apex
Regards,
Arie.
♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
♦ Author of Oracle Application Express 3.2 – The Essentials and More

Similar Messages

  • Materialized View with column based on PL/SQL function returning object

    I have the following problem - it is known that materialized view wants PL/SQL functions used in it to be DETERMINISTIC. And it appears that a function which returns SDO_GEOMETRY cannot be DETERMINISTIC - I can add DETERMINISTIC modifier to my function which returns sdo_geometry based on USNG grid ID and save the package, and it compiles and runs fine with regular queries, but when it comes to materialized view (mview), the following error is thrown:
    ORA-12018: following error encountered during code generation for "SCHEMA"."MVIEW_NAME"
    ORA-00932: inconsistent datatypes: expected NUMBER got MDSYS.SDO_GEOMETRY
    Looks like DETERMINISTIC modifier is not fully supported for object types. I have tried to use SDO_CS.FROM_USNG Oracle's function, and it appeared that this function is also non-deterministic - I cannot refresh mview with P or F on-demand refresh method (see http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14223/refresh.htm#i1008349 for a list of on-demand refresh methods). Without that function I can refresh mview with P or F flags.

    Hi,
    Yes, the Chart Series can be based on "Function Returing SQL Query" and the "SQL" would be something like:
    DECLARE
    vSQL VARCHAR2(1000);
    BEGIN
    vSQL := 'SELECT NULL LINK, ENAME LABEL, SAL VALUE FROM EMP ORDER BY ENAME';
    RETURN vSQL;
    END;You should tick the "Save query without validation" underneath that. Without this, there is a validation error - the ; at the end is required to get the chart to function correctly but the validator sees this as an error.
    You would need to create this separately from the report. No matter how you did it, the chart would still run a SQL statement to generate the output. If you wanted to use the "same data", then you could create a collection using the PL/SQL and base both the report and the chart on the collection instead.
    Andy

  • Dynamically adding attribute based on PL/SQL function

    I've been tasked with dynamically applying security to an XMLType input sample as a post XML generation process (on an 11g R2 DB) based on several parameters. The best way to describe it is with an example block of code, I need to write ApplySecurity....
    declare
      vXML XMLType;
      BONUS_SEC constant integer := 24; -- Security identifier for Bonus
      function ApplySecurity(pXML        XMLType,
                             pSecurityID integer,    -- A Security identifier
                             pDataIDPath varchar2,   -- Absolute XPath to the data id which is passed to value
                             pAttribPath varchar2    -- Relative XPath to pDataIDPath where we want the security result attribute stored
                             ) return XMLType is
      begin
          for all DataIDs found in pDataIDPath
            Call an PL/SQL function GetSecurityDesc(pSecurityID, pDataID)
              Store the result of this back in the XML in the pAttribPath as SECURITY attribute
      end;
    begin
      vXML := ApplySecurity(XMLType('<ROWSET>
                                       <ROW>                                
                                         <BONUS_ID>8</BONUS_ID>
                                         <DESCRIPTION>Test Bonus</DESCRIPTION>                                                                           
                                       </ROW>
                                       <ROW>                                
                                         <BONUS_ID>9</BONUS_ID>
                                         <DESCRIPTION>Another Bonus</DESCRIPTION>                                                                           
                                       </ROW>                         
                                       <ROW>                                
                                         <BONUS_ID>10</BONUS_ID>
                                         <DESCRIPTION>April Bonus</DESCRIPTION>                                                                           
                                       </ROW>                         
                                     </ROWSET>'),
                             BONUS_SEC,       
                             '/ROWSET/ROW/BONUS_ID',
    end;
    /* Example of the Desired Output =
    <ROWSET>
      <ROW>                                
        <BONUS_ID SECURITY="HIDDEN">8</BONUS_ID>
        <DESCRIPTION>Test Bonus</DESCRIPTION>                                                                           
      </ROW>
      <ROW>                                
        <BONUS_ID SECURITY="READONLY">9</BONUS_ID>
        <DESCRIPTION>Another Bonus</DESCRIPTION>                                                                           
      </ROW>                         
      <ROW>                                
        <BONUS_ID SECURITY="NONE">10</BONUS_ID>
        <DESCRIPTION>April Bonus</DESCRIPTION>                                                                           
      </ROW>                         
    </ROWSET>
    */I have tried several approaches like iterating using a dynamically created XMLTable and calling InsertChildXML for each iteration, but that seems messy and inefficient as the call to InsertChildXML will have to locate the correct node each time. Ideally I think the best solution would be to do it with XQuery, but online examples are few and far between and I don't know how I'd call a PL/SQL function as part of an XQuery iteration as well as passing in the path information.
    Anyone have any ideas? Thanks!

    A funnier option, adapted from http://odieweblog.wordpress.com/2012/06/19/how-to-update-xml-nodes-with-values-from-same-doc/ :
    declare
      BONUS_SEC  constant integer := 24;
      vXML XMLType := XMLType(
    '<ROWSET>
      <ROW>                                
        <BONUS_ID>8</BONUS_ID>
        <DESCRIPTION>Test Bonus</DESCRIPTION>                                                                           
      </ROW>
      <ROW>                                
        <BONUS_ID>9</BONUS_ID>
        <DESCRIPTION>Another Bonus</DESCRIPTION>                                                                           
      </ROW>                         
      <ROW>                                
        <BONUS_ID>10</BONUS_ID>
        <DESCRIPTION>April Bonus</DESCRIPTION>                                                                           
      </ROW>                         
    </ROWSET>');
      pSecurityID integer      := BONUS_SEC;
      pDataIDPath varchar2(80) := '/ROWSET/ROW/BONUS_ID';
      pAttribPath varchar2(80) := '.';
      queryString varchar2(4000);
    begin
      queryString :=
    q'~select xmlpatch(
             :b1
           , xmlelement("xd:xdiff"
             , xmlattributes(
                 'http://www.w3.org/2001/XMLSchema-instance' as "xmlns:xsi"
               , 'http://xmlns.oracle.com/xdb/xdiff.xsd http://xmlns.oracle.com/xdb/xdiff.xsd' as "xsi:schemaLocation"
               , 'http://xmlns.oracle.com/xdb/xdiff.xsd' as "xmlns:xd"
             , xmlpi("oracle-xmldiff", 'operations-in-docorder="true" output-model="current"')
             , xmlagg(
                 xmlelement("xd:append-node"
                 , xmlattributes(
                     'attribute' as "xd:node-type"
                   , '(#DATA-ID-PATH#)[' || x.NodeOrder || ']' as "xd:parent-xpath"
                   , 'SECURITY' as "xd:attr-local"
                 , xmlelement("xd:content", GetSecurityDesc(:b2, x.DataID))
    from xmltable('#DATA-ID-PATH#'
           passing :b3
           columns DataID    integer path '#ATTRIB-PATH#'
                 , NodeOrder for ordinality ) x~';
      queryString := replace(queryString, '#DATA-ID-PATH#', pDataIDPath);
      queryString := replace(queryString, '#ATTRIB-PATH#', pAttribPath);
      execute immediate queryString into vXML using vXML, BONUS_SEC, vXML ;
      dbms_output.put_line(vXML.getclobval);
    end;
    /probably slower though.

  • Interactive Report based on pl/sql function body

    Can an interactive report be based on a pl/sql function body returning the query sql? Or does it have to be based directly on the SQL?
    Thanks

    Hello "unknown user",
    As far is I know an Interactive Report can only be based on 'regular' SQL. If you have a Report based on a 'PL/SQL function body returning SQL' the option to migrate the report to an interactive report is not there.
    Regards,
    Roel
    http://roelhartman.blogspot.com/
    http://www.bloggingaboutoracle.org/
    http://www.logica.com/

  • SVG multiline chart based on PL/SQL function

    Dear all -
    Having trawled this forum and with a fair bit of experimentation I've concluded that:
    1. Generating an SVG line series using a PL/SQL function returning a SQL statement is perfectly possible;
    BUT
    2. It only works for a single series. Adding further series blanks out the SVG chart area and nothing at all is displayed.
    Can anyone tell me if this is right or am I missing a trick? The usual problems such as ordering, nulls etc. don't apply in this case.
    Thanks for your time.
    John.

    On some, but not all SVG line charts, I had trouble when some values are ZERO.
    Putting a CASE WHEN var = 0 then 0.05 ELSE var END in the select statement
    fixed those situations.
    I had missing lines when the number of data points in a series exceeded the default number of 15, and I did not set in the series configuration to a number equal to or higher that the number of data points in that series.
    And I had one instance, where a couple missing lines reappeared when I exited
    the browser and app completely and restarted the app.
    All these comments apply to ver 1.6x and 2.0x

  • Webservice based on PL/SQL function - ORA-04068

    Hi,
    we have a problem here with PL/SQL based webservices. If the PL/SQL package gets invalid then the very first request to the webservice results in:
    java.sql.SQLException:
    ORA-04068: existing state of packages has been discarded
    ORA-04061: existing state of package "TUG_NEW.WBSERVICES" has been invalidated
    ORA-04065: not executed, altered or dropped package "TUG_NEW.WBSERVICES"
    ORA-06508: PL/SQL: could not find program unit being called ORA-06512: at line 1
    Any workarounds? Shouldn't the package become recompiled automatically when it was invalid?
    Thanks, Christian

    the caller gets an error on the first request. from the second request on it works ... indicates the package is not yet recompiled when the first request is sent. When the second request is sent, the package has been recompiled.

  • Application Report Missing PL/SQL Functional Area

    All,
    I just wanted to bring to the ApEx developers something I just noticed... I use the Shared Components > Database Object Dependencies report to make sure all is well before moving applications into production.
    The Parsing Errors feature of that report is WONDERFUL! But it seems to be overlooking buttons that use a conditional display based on PL/SQL Function Body Returning a Boolean.
    Dan

    Hi Dan,
    I think the place is perfect, but I read once somewhere that "Bug" or "Bug Report" should be in the subject so that's easier to find for the Oracle guys.
    Patrick
    My APEX Blog: http://inside-apex.blogspot.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/

  • Pass a value from a PL/SQL function to a javascript (html header) ? ?

    Hey Guys,
    Have a question regarding how to pass a value from a PL/SQL function to a javascript in the HTML Header.
    I have created a PL/SQL function in my database, which does looping.
    The reason for this is:  On my apex page when the user selects a code, it should display(or highlight buttons) the different project id's present for that particular code.
    example= code 1
    has project id's = 5, 6, 7
    code 2
    has project id's = 7,8
    Thank you for your Help or Suggestions
    Jesh
    The PL/SQL function :
    CREATE OR REPLACE FUNCTION contact_details(ACT_CODE1 IN NUMBER) RETURN VARCHAR2 IS
    Project_codes varchar2(10);
    CURSOR contact_cur IS
    SELECT ACT_CODE,PROJECT_ID
    FROM ACTASQ.ASQ_CONTACT where ACT_CODE = ACT_CODE1;
    currec contact_cur%rowtype;
    NAME: contact_details
    PURPOSE:
    REVISIONS:
    Ver Date Author Description
    1.0 6/25/2009 1. Created this function.
    BEGIN
    FOR currec in contact_cur LOOP
         dbms_output.put_line(currec.PROJECT_ID || '|');
         Project_codes := currec.PROJECT_ID|| '|' ||Project_codes;
    END LOOP;
    RETURN Project_codes;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    WHEN OTHERS THEN
    -- Consider logging the error and then re-raise
    RAISE;
    END contact_details;
    /

    Jesh:
    I have made the following modifications to your app to get it to work as I thing you need it to.
    1) Changed the source for the HTML Buttons Region(note use of id vs name for the Buttons)
    <script>
    function hilitebtn(val) {
    //gray buttons
    $x('graduate').style.backgroundColor='gray'
    $x('distance').style.backgroundColor='gray'
    $x('career').style.backgroundColor='gray'
    $x('photo').style.backgroundColor='gray'
    //AJAX call to get project-ids
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=GETPROJECTS',0);
    get.addParam('x01',val)
    gReturn = get.get();
    var arr=gReturn.split(':');  //dump into array
    get = null;
    for (i=0;i<arr.length;i++) {
    // alert('val=' + arr);
    if ( arr[i]==5)
    $x('graduate').style.backgroundColor='red';
    if ( arr[i]==6)
    $x('distance').style.backgroundColor='red';
    if ( arr[i]==7)
    $x('career').style.backgroundColor='red';
    if ( arr[i]==8)
    $x('photo').style.backgroundColor='red';
    </script>
    <table cellpadding='0' cellspacing='0' border='0'>
    <tr><td>
    <input type='button' id='graduate' value='Graduate'>
    </td>
    <td>
    <input type='button' id='distance' value='Distance'>
    </td>
    <td>
    <input type='button' id='career' value='Career/Tech'>
    </td>
    <td>
    <input type='button' id='photo' value='Photos'>
    </td>
    </tr></table>
    2) Defined the application process  GETPROJECTS as DECLARE
    IDS varchar2(1000);
    l_act_code varchar2(100) :=4;
    begin
    IDS:='';
    l_act_code := wwv_flow.g_x01;
    for x in(
    SELECT ACT_CODE,PROJECT_ID
    FROM ASQ_CONTACT
    where ACT_CODE = l_act_code)
    LOOP
    IDS := IDS || X.PROJECT_ID|| ':' ;
    END LOOP;
    HTP.PRN(IDS);
    END;
    3) Changed the 'onchange' event-handler on p1_act_code to be 'onchange=hilitebtn(this.value)'
    4) Added the JS to the HTML Page Footer <script>
    hilitebtn($v('P1_ACT_CODE'));
    </SCRIPT>

  • Reports based on PL/SQL Procedure/Function

    Hi all,
    After some serious Google and forum searches, it appears as if this is something that just isn't possible (or easy to do).
    I've been charged with creating an APEX application that displays reports. There are a series of Procedures that will be written to return a result set, updated to take into account some filters that a user would provide. The key here is that the report won't be displayed until AFTER a user inputs some filters on a form and hits a Submit button. The project requires this functionality - allowing the report to be displayed and THEN filtered using the APEX IR Control is not desired (not my decision).
    There doesn't seem to be an easy way to define a report in this manner. It appears that the query for a report query needs to be known ahead of time.
    So, with that setup - is there a way to define an APEX report based on the return result of a PL/SQL function? OR is there a way to define a report using a SQL Query that is built based on user inputs?
    Any help would be appreciated.
    - Pedro

    Hi,
    Check if this post help you.
    Dynamic html table
    And normal reports can be also created from select that function is returning.
    http://www.oracle.com/technology/products/database/application_express/howtos/dynamic_report.html
    Br, Jari
    Edit:
    Maybe useful
    http://www.apex-blog.com/oracle-apex/dynamic-report-regions-tutorial-32.html
    http://www.oracleapplicationexpress.com/2009/02/interactive-report-based-on-plsql.html
    Edited by: jarola on Sep 9, 2009 5:14 PM

  • How to call a SQL function from an XSL expression

    Hi
    In R12, in Payroll Deposit adivce/Check writer, We need to sort the earnings tag <AC_Earnings> in to two different categories as regular and other earnings. In the DB and form level of element defintiion we have a DFF which differentiates between the two kinds of earnings. But the seeded XML that is gerneated by the check writer does not have this field.
    The seeded template displays all the earnings in one column. How can we achieve this in the template without modifying the seeded XML.
    The one approach i have is to write a function and based on the return value sort the data. For this I need to know :
    1) How to call a SQL function from an XSL expression that is allowed in BI template.
    If anyone ahs faced similar requirements please share your approach.
    Thanks
    Srimathi

    Thank u..
    but i'd seen that link wen i searched in google..
    Is it possible without using any 3rd party JARs and all?
    and more importantly plz tell me what should be preferred way to call a javascript function?
    Do it using addLoadEvent() or Windows.Load etc
    OR
    Call it thru Xsl? (I donno how to do dis)
    Thanks in Advance..
    Edited by: ranjjose on Jun 3, 2008 8:21 AM

  • HTTP - Calling a PL/SQL Function

    I am wanting to call a PL/SQL Function over the web.
    Say if I am using Oracle APEX and my user is the standard "HR".
    How would I call a function from PL/SQL made by the user HR called EXAMPLE_FUNCTION.

    It depends on where you want to call the function. Easiest method would be to create a region based on the PLSQL function.
    If you want to do some plsql function after the page is rendered, then you should find out the event for the field such as onchange or onblurr and call
    a Javascript. The javascript can cal the plsql function...
    Also note that under the database forums there is a forum for Apex and u can see many samples
    Rajesh

  • Passing Multiple Values from a worksheet to PL/SQL function.

    Hi All,
    Is there any way to pass multiple values selected in a worksheet to a PL/SQL function ?
    I will try to explain the scenario:
    We have a crosstab report that showing all the customer details, deposit sum of a customer in each date in a date range selected. With the customer details we are showing the Rank of a customer based on the deposit in the latest date selected. Filtering is based on the rank, ie Top50 or Top60 etc.( As I said rank is calculating based on the deposit in the latest date).This is working fine.
    Now the new requirement is to : For example, in Top50 report, list all the customers, who were in the Top50 list, in any of the dates selected. We are able to display the daywise rank, but when giving a condition like daywiserank <= 50, the result becomes uncertain. Some blank lines, wrong amounts etc..
    As a work around we tried to find out the rank in a PL/SQL function. But the issue there is : we have some multiple value parameters used in the worksheet.
    Is there any way to pass multiple values selected in a worksheet to a PL/SQL function ?
    Or any other work arounds for the scenario explained?
    Reagrds,
    Jeneesh

    Hi Russ,
    Thanks for the response.
    Russ Proudman wrote:
    1. I thought there was an analytical function similar to rank - or maybe an option of rank - that if there are duplicate records to have them all considered the same rank. So if you had 3 records all the same as rank=2 then a condition saying where rank=2 would return the 3 records. You could check into this.
    We are already using DENSE_RANK. But the issue is the output contains incorrect null values nd repeated rows.
    We got it solved as I explained in the previous post. But will that AGGREGATION MODE setting ( Which discoverer says - not recommended) have any issue? I mean side effects?
    Russ Proudman wrote:
    2. Another thought is that you can create a PL/SQL routine - that's called from a SQL function registered in Discoverer - where a table is created that does the first part of your query. Then a worksheet is created to use the data from that table. So, in essence, the table would have your top50 ranked customers. Then you can write any kind of worksheet against that table. However, DBAs are loath to allow tables - that they didn't create! - many times in a PROD environment.
    Here also the same problem will occur: as the top 50 will depend upon the parameters. I cannot pass those parameters to PL/SQL Function.And storing the top50 ( itmay be top100 or to 150 also) for all combinations of the parameters is impossible
    Russ Proudman wrote:
    3. Finally, are you sure you're rank function is correct in that if you're getting blank lines, maybe the 'over' part is not considering all columns needed to determine the rank?
    Yes the query we are using is correct. The output QUERY of discoverer gives correct results in Sqlplus.
    Regards,
    Jeneesh

  • Is it possible to retrieve RAD's extended variables with a pl/sql function?

    Good morning everyone,
    We have our forms and reports(10g) application, SSO enabled and we are using OID on 10g app server. some of our users use smart card to log in to the system and some who do not have smart cards provide their database userid, password and SID.
    In the case of users who login with smart card, as a one time effort, they have to register their smart card. At that point OID presents a form prompting for their username, password, sid and then a RAD record is created for that particular user.
    And from then on when the user enters the system using his smart card(12345@mil), forms servlet, does the look up of dbusername,dbpswd,sid which belong to the 12345@mil and user's database credentials are passed to the application. The entire application logic is based on that userid which is also an internal userid in the application. Everything is working fine.
    I have read the documentation and found that 12345@mil is stored in the "cn" parameter and the orclownerguid and orclusernameattribute are stored under "cn"=extended properties in the oid. I am able to see this from the oid console.
    But now I need some help. If I only know the id of the user as "12345@mil" , is it possible to manually query the RAD and retrieve the orclusername from a pl/sql function?
    Any help is greatly appreciated.
    Regards,
    Suma.

    Please can anyone help me????
    Regards,
    Suma.

  • List of values (LOV) based on PL/SQL

    Is it possible to create a LOV based on PL/SQL ?
    I want to do this because I have at least 5 LOV based on the same query (when you are using bind variables).
    This is the normal query (ex.: LOV_FREQ_CODES) :
    SELECT c.code ||' - '|| c.description AS display,
    c.code AS return
    FROM codes c,
    code_types ct
    WHERE c.code_type = ct.id
    AND ct.code_type_description = 'Frequency' (should be a Bind Variable)
    Thx

    Look into "Pipelined Table Functions" (http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/x/Table_Functions_Cursor_Expressions/Pipelined_Table_Functions.htm)
    Basically you have your codes tables and a function (get_code). The function is passed a parameter (bind variable). The function then fires a query using the parameter value to render rows which are "pipelined" are a return value of the function. So you LOV query would look like:
    SELECT c.code ||' - '|| c.description AS display,
    c.code AS return
    FROM codes c, TABLE(get_code('Frequency')) ct
    WHERE c.code_type = ct.idMike

  • Data passed from Java to a PL/SQL function

    OK, I am at the beginner-to-intermediate level when it comes to PL/SQL...and a virtual novice when it comes to Java, so please forgive me if my question seems strange or naive.
    We are developing a Java-based web app. Some of the screens are reminiscent of a spreadsheet-type layout--potentially LOTS of rows and LOTS of columns (actually, an open-ended # of rows/columns--the rows represent a particular 'thing' and the columns represent the dates on which that 'thing' occurred), where the user can check off any and all the cells that apply. We are also 'auditing' all database activity (who did what to the data, and when). The approach we have chosen is as follows: When the user clicks save, the first thing we do is 'inactivate' all of the existing active rows in the db for that screen, whether or not they have changed(i.e., there is an 'active' flag that we set to false & we also save the user id of the person making the change and the date time of the change). Then the Java code calls the database once per row/contiguous column unit. For instance, on a single row, if the user checks off columns 1-4 and 7-15 and column 21 the Java code will send three calls to the database for that row with info about the start/stop column for each unit.
    OK--here is my concern...the majority of the time there will be a reasonably small #of 'units'. Occasionally there will be a moderate, and once in awhile a LARGE # of 'units'. So, let's take an extreme case and say that currently the db has 200 such row/contiguous column units for a given screen. The user goes into that screen and adds the 201st unit, then clicks Save. Java calls the db to first inactivate the 200 rows. Then one by one Java calls the db to add the rows back in, only on row #40, the internet connection is lost. The only way the user can tell what happened is to look at the entire screen and reverify ALL the data in order to tell what got saved/resaved and what didn't. Obviously this is a bad situation that we want to avoid.
    I should add that the reason this approach was chosen is that the Java developers thought it would be way too complex in this situation to track the changes the user made on the screen, sort out what has been added/modified/deleted, and only call the db for changes.
    So given this background, can anyone offer any suggestions/ideas on how we can prevent unintended data loss given the auditing constraints and concern about minimizing complexity on the Java side (redesigning the GUI screen is NOT an option, as the users are very attached to this design)?
    Is there a way for Java to pass a multidimensional (& variable-sized) array to a PL/SQL function? Can Oracle's complex (row, table) data types be used in a function's parameter string, and if so...how?...Or else is there some way we can send a single call to the db on a screen like this one? We thought of calling the db once and sending one very large string packed with all the data (could get very big, not sure of Oracle's limatations on passed data--is it 32K for varchar2? )
    Advice, ideas, even random thoughts would be greatly appreciated!

    Tracy,
    <quote>… only on row #40, the internet connection is lost. The only way the user can tell what happened is to look at the entire screen and reverify ALL the data in order to tell what got saved/resaved and what didn't</quote>
    That would be "the only way" if the Java programmers had decided to totally bury the error … what should happen here is the end-user should get a proper error message … no need to re-verify at this point since all bets are off (in fact, nothing should’ve been changed in the database).
    Nonetheless, your concerns regarding the chosen approach are valid … making multiple calls to the database after a Save makes controlling a business transaction rather complex (in an n-tier system) … they should make one call only to the database passing in all the data to be saved … one database transaction … either all changes get applied or none.
    The fact that lots of data may need to be passed in for one Save is of no relevance … if you have to carry 500Kb of data for that screen then, well, you have to do it … 1 bucket of 500Kb or 50 buckets of 10Kb? … it doesn’t really matter as far as the actual transport part is concerned.
    As already answered, one can pass complex types in pl/sql … so one database call per Save would be my first random thought. There are lots of suspect things in here … some things you didn’t mentioned at all … like how is concurrency addressed? … have you/they implemented some sort of optimistic locking mechanism? Of course the architecture of your system won’t be solved in a forum … so, finding a good system/data/Oracle architect on site for the project would be my second random thought.
    PS. One last random thought … fight off that idea of packing and sending large strings (XML or not) … if the data is structured then contemplate XML for no more than few seconds.

Maybe you are looking for