GLOBAL has FALSE value in Streams environment ?

Hi all
I have a database server, i called it is A_DB (mean A_DB shema) running on machine_1.
A_DB there is a database link called alink.
Now, I want use Oracle Streams to replicate schema A_DB and it's local capture. Also, I were created a shema A_DB on other server machine (machine_2) and it's destination database.
On machine_1, there are alot of store procedures and triggers that they use alink. I set GLOBAL_NAMES = TRUE, alink not effect ! I can't edit name of this database link. If I set GLOBAL_NAMES=FALSE (default), have some problems with my stream environment if i do this ?
I think that, if the GLOBAL_NAMES = FALSE, and I create a database link same database name, all things ok ??
Pls, give me some ideas !
Thanks.

Just fall on this while reading the 2 days guide manual, the term 'recommend' is used :
'The unique identifier for each database is referred to as its global database name ..bla...bla...bla.. then Oracle recommends that you set this parameter to TRUE at each database'
[http://download.oracle.com/docs/cd/B28359_01/server.111/b28324/tdpii_common_ii.htm|http://download.oracle.com/docs/cd/B28359_01/server.111/b28324/tdpii_common_ii.htm]

Similar Messages

  • One of the database is down in streaming environment

    I have scenario where one of the database in (two different database) streaming environment is unavailable due to nework/link/database maintenance purpose. Since my other database is up and running and DML/DDL operations are in process how can I avoid following error
    SQL> insert into test values ('eee', 'code e');
    1 row created.
    SQL> commit;
    commit
    ERROR at line 1:
    ORA-02050: transaction 5.23.8870 rolled back, some remote DBs may be in-doubt
    ORA-02068: following severe error from OTHER_DOWN_DATABASE
    ORA-03113: end-of-file on communication channel
    ============================================
    Can I change some parameters in DBMS_STREAMS_ADM Package or any other packages to avoid above situation

    Thanks for the reply.
    I am getting the same error even If I just do select on the table which I have for streaming
    SQL> select * from test@dbtest;
    select * from test@dbtest
    ERROR at line 1:
    ORA-02068: following severe error from DBTEST ---destination database
    ORA-03113: end-of-file on communication channel.
    Q- Wich database is down? Is it the source database or the destination database?
    For now I am testing with keeping down destination database.
    Q- If it's the source db, just stop the capture. That's all you really have to do.
    A- This can be good for planned maintenance, but how about unplanned outage or sudden problem (with networks/links or all of a sudden I can not stream my data changes to destination database).
    Q--The error you're describing is unclear.... Do you get that error immediately when you issue the insert and the commit? That sound very very strange to me because streams does asynchronous replication... You would not get such an error for db down from my opinion.
    A-- First time, I got this error when I updated a row and then tried to commit while my destination database was down.
    Q- It looks like the problem has nothing to do with streams but rather a distributed transaction problem (2pc)...
    A- If it is transaction problem should I be getting similar error while selecting from destination table, see the above error

  • Cookie has a value when it should not

    I've been working on a bit of bot mitigation and began using checks against Cookie.CFID to verify the client has a value in reply.
    I'm using CF  9,0,1,274733
    application.cfm includes the following:
    <cfapplication sessionManagement="True" clientManagement ="False" setClientCookies="True" sessionTimeout="#CreateTimeSpan(0, 0, 2, 0)#">
    I disable cookies in FF 23 browser to simulate a bot and conduct the test.
    In my test the check for Cookie.CFID is as expected, empty.  Here is a snippet of code used to test this.
    <cftry>
        <cfif REFind("YourIPAddress",CGI.REMOTE_ADDR)>
            <cfif ! IsDefined("Cookie.cfid")>
                <cfoutput>
                    No Cookies as expected!
                </cfoutput>
            </cfif>
            <cfdump var="#Cookie#">
        </cfif>
        <cfcatch type="Any">
            <cfdump var="#cfcatch#">
        </cfcatch>
    </cftry>
    And the result expected from that test:
    No Cookies as expected! 
    struct [empty]
    However, with the same test environment configuration as above in another page I'm getting a non empty struct when dumping cookies like this:
    <cfdump var="#Cookie#">
    produces:
    struct
    CFID
    SomeId
    CFTOKEN
    SomeToken
    Is there some function or feature in ColdFusion known to cause this behavior or is this a bug?

    Kaja,
    You found another bug. Thank you for the superbly detailed description. As a workaround, for your process's exception block, use this instead: exception when others then
      htmldb_application.update_cache_with_write('P51_OBJ_ADDRESS',null);
      return null;
    end;You will encounter this bug rarely -- only when referencing the current value of an item whose source/default/post-computation results derived earlier on the page result in a null value and for which item a non-null value currently exists in the session state table.
    Scott

  • What does this actually mean and how do I fix it: Alert: Error Count Monitor Resolution state Object Hyper-V Virtual Storage Device Has a value

    We are getting this alert on a fair few of our VMs with VHDXs and Dynamic VHDs. Everything seems OK but I am not sure what this actually means and what I need to do to resolve the issue. How do I reset the error count if that is what is required? Thanks
    in advance.
    Alert: Error Count Monitor Resolution state: New
     Error Count Monitor Source: MyVm01 Path: MyHost.MyDomain.local;MyHost.MyDomain.local;FE71577B-A2E2-45C0-B757-2FBCEC9311DE Last modified by: System Last modified time: 2/9/2013 2:08:48 PM Alert description: Instance c:-clusterstorage-volume1-MyVm01-virtual
    Sat 09/02
    To:Administrator
     09 February 2013 14:09
    Alert: Error Count Monitor
    Source: MyVm01
    Path: MyHost.MyDomain.local;MyHost.MyDomain.local;FE71577B-A2E2-45C0-B757-2FBCEC9311DE
    Last modified by: System
    Last modified time: 2/9/2013 2:08:48 PM
    Alert description: Instance c:-clusterstorage-volume1-MyVm01-virtual hard disks-MyVm01-DATA02.vhdx
                Object Hyper-V Virtual Storage Device
                Counter Error Count
                Has a value 9
                At time 2013-02-09T14:08:48.0000000+00:00
    Darren

    But I am getting this alert from SCOM and SCOM has no information about the alert for me to find out what to do - thought that was the point of SCOM to let you know of problems and how to resolve them. :)
    The alert is coming from the Error Count Monitor that is part of the Hyper-V Management Pack Extensions (v 4.0.0.0)
    I have tried looking in the Event Logs on the Host and there doesn't seem to be any storage related errors there. I am trying to establish if this is a false positive, why it is happening and if it is safe to override and ignore.
    There is nothing on the Product Knowledge tab and nothing on the Alert Context other than what I have already mentioned (see below).
    Thanks for responding.
    Time Sampled:
    09/02/2013 14:08:48
    Object Name:
    Hyper-V Virtual Storage Device
    Counter Name:
    Error Count
    Instance Name:
    c:-clusterstorage-volume1-myvm-virtual
    hard disks-MyVM-DATA02.vhdx
    Value:
    9
    Darren

  • Parameter Query for True or False values

    I have what seems like a painfully simple task and it has me stopped dead.  I reviewed a similar thread, and the answers there don't seem to apply. Working in Crystal 11.5 with an MS SQL database.
    I am pulling data from vwCommmittees.  There is a field in this view called IsActive.  I want to create a committee list report that will allow the user to select only the active committees or all committees.
    A SQL select statement that says where dbo.IsActive = '1' will return only the active committees.
    In Crystal reports, if I place the IsActive field on the report, it returns with "True" or "False."
    When I create a parameter for this field, I find that 1) I can't see the parameter in the report expert -- my only choices are Is any value, Is true, Is false or Formula.
    I've made several attempts to create a formula and nothing is working. It's not clear to me wheter I should be creating a static or a dynamic parameter.  When I choose boolean as the type, that doesn't seem to help.  I tried a dynamic parameter which gave me true and false values, but don't seem to work.
    Any pointers on dealing with this kind of parameter query would be greatly appreciated.
    Sincerely,
    Ridge (in New Joisey)

    Hi..
    Create a static parameter and give the default values like
    0 and 1
    In Record Selection check like..dbo.IsActive = {?parameter}
    If the above is not working for you, then create a formula
    like..
    If dbo.IsActive = '1' then
    "Active"
    Else "In Active"
    Place this formula on your report and create a static parameter with default values Active and In Active.
    In record selection filter the above.
    Thanks,
    Sastry

  • Performance tuning and Periodic Maintance in Oracle Streaming Environment

    We had Setup the Bi-Directional Oracle Streaming between two remote Sites each of 2-Node RAC Databases
    This is Our Enviroment Summary.
    Database Oracle 10g R2 version 10.2.0.4.0
    Os: Solaris[tm] OE (64-bit)
    Currenly Oracle Streaming working Successfully and I'm Daily Monitor the Same.
    As Mention in the Master Note for Streams Performance Recommendations [ID 335516.1]
    Purging Streams Checkpoints
    10.2: Alter the capture parameter CHECKPOINT_RETENTION_TIME from the default retention of 60 days to a realistic value for your database.
    A typical setting might be to retain 7 days worth of checkpoint metadata :
    exec dbms_capture_adm.alter_capture(capture_name=>'your_capture', checkpoint_retention_time=> 7);
    My Query
    ===> Currenly In My Environment CHECKPOINT_RETENTION_TIME is as default 60 days
    I want to change the checkpoint_retention_time=> 7 so what should I take care for before execute the above command in my Live Streaming Environment.
    Edited by: user8171787 on Apr 13, 2011 11:00 PM

    We had Setup the Bi-Directional Oracle Streaming between two remote Sites each of 2-Node RAC Databases
    This is Our Enviroment Summary.
    Database Oracle 10g R2 version 10.2.0.4.0
    Os: Solaris[tm] OE (64-bit)
    Currenly Oracle Streaming working Successfully and I'm Daily Monitor the Same.
    As Mention in the Master Note for Streams Performance Recommendations [ID 335516.1]
    Purging Streams Checkpoints
    10.2: Alter the capture parameter CHECKPOINT_RETENTION_TIME from the default retention of 60 days to a realistic value for your database.
    A typical setting might be to retain 7 days worth of checkpoint metadata :
    exec dbms_capture_adm.alter_capture(capture_name=>'your_capture', checkpoint_retention_time=> 7);
    My Query
    ===> Currenly In My Environment CHECKPOINT_RETENTION_TIME is as default 60 days
    I want to change the checkpoint_retention_time=> 7 so what should I take care for before execute the above command in my Live Streaming Environment.
    Edited by: user8171787 on Apr 13, 2011 11:00 PM

  • Variable has no value when executing a scenario

    Hi,
    I have a simple package consists of two steps:
    1. Refresh a variable "V_FILENAME_D501" to get the value inputted from user. The refreshing statement is "select '#V_FILENAME_D501' and it is running in a SQLServer environment.
    2. Execute an interface which loading data from a file (filename from step 1) into an essbase database.
    The execution failed at step 1 with the following error message:
    java.lang.Exception: Variable has no value: CBS_PRD_PROJECT.V_FILENAME_D501
    at com.sunopsis.dwg.dbobj.SnpVarSess.getValue(SnpVarSess.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.bindSessVar(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.bindSessVar(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskPreTrt(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSqlV.treatTask(SnpSessTaskSqlV.java)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
    at com.sunopsis.dwg.cmd.e.i(e.java)
    at com.sunopsis.dwg.cmd.h.y(h.java)
    at com.sunopsis.dwg.cmd.e.run(e.java)
    at java.lang.Thread.run(Unknown Source)
    Any Idea what happens?
    regards,
    James.

    Hi James,
    How are you?
    You can't query a file data store so it will error out. You need to build a small logic for that. Please follow the below steps to implement that.
    1. In your source data store just give the resource name as #CBS_PRD_PROJECT.V_FILENAME_D501
    2. Drag and drop that data store as your source in the interface.
    3. Make your variable V_FILENAME_D501 data type as Alphanumeric, Action as Not Persistent.
    4. Drag and drop the twice variable in your package make that as a Declare variable and in the second step make that as Refresh Variable then in the third step your interface.
    5. Generate a scenario out of that and while executing that scenario give the Value as your desired file name, hit enter once you gave, otherwise it wont take the input and make sure that LAST VALUE is UNCHECKED.
    PS: You can still do it without Default Value as *<%=odiRef.getSrcTablesList("", "[SCHEMA]/[RES_NAME]", "", "")%>* :)
    Thanks,
    G
    Edited by: Gurusank on Mar 16, 2009 2:58 PM

  • Error Data record has grouping value "" instead of 99

    Hi,
    We are implementing ESS and MSS for EP7.0 with ECC 5.0 and we get the following error: Data record 0000005900090      9999123120010910000 has grouping value "" instead of "99" when we try to edit and save the bank information.
    Please advise! Thank you!

    same error ,
    the report did not fix it .
    its coming up when ever i am trying to do a global assignment actions ...( this is occuring only for people with benefits infotypes)
    any idea..
    Please let me know
    Thanks

  • Global variable default value

    Hi All.
    I am running Test Stand 3.5 scripting Labview 7.1 vi's to test batches of populated PCB's (using single pass method). On each initial run of aTest Stand session the test site cables need to be calibrated and the values stored for later use. i.e calibrate the site just the once per session.
    I have tried using both a boolean station global and boolean sequence file global and setting them to 'True' when calibration is finished. However the sequence file global defaults to 'False' at the end of each run, (hence cuasing a calibrate each run). and the station global stays 'True' even after the session is ended and Test Stand is closed down. ( hence next session calibration routine is ignored).
    Is there a way to either  a) stop the sequence file global defaulting to 'False' after each 'single pass' run yet default to 'False' on Test Stand shutdown. Or b) default the station global to 'False' on Test Stand shutdown? either method would be OK.
    Any help would be appreciated.
    Thanks
    Ian R

    Thanks anyway but I just found I need to set the sequence file global properties to 'Shared at run time'.
    Cheers

  • Dithering buttons based off of whether or not a choice field has a value

    Hi,
    I am trying to dither out a button until a choice field has a value in it. I have been noticing that users have been submitting the form without selecting any of the options in the choice field (has about 40 choices).
    I would make that field required, but it would interfere with different views of the form that do not have that section attached to them.
    I have tried dithering the button if the value or if the field itself is either blank or not present, but it does not appear to be working.
    I was thinking that I may need to create a single line of text field that populates if a value is present, however, was hoping there would be an easy way to do this.
    Any help would be greatly appreciated!
    Thanks (happy holidays),
    Greg
    Greg Baker

    Hi  Greg,
    Thank you for your posting!
    For achieving your demand , you can use JavaScript as following:
    Create a field CurrentView to record the current view.
    Add set a field’s value rule on switch view button, such as when we click switch view 1 button, the rule will set the CurrentView  field to 1.
    Add  below JavaScript:
    function validateDropDown() {
    var curView =document.getElementById(“CurrentView”);
    if(curView==1)
    var ddl = document.getElementById("DropdownListID");
    if (ddl.selectedIndex == 0 || ddl.options[ddl.selectedIndex].value == "")
    alert("Please select an option! ");
    return false ;
    else { return true ;}
    </script>
    Hope this helps,
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Need validation that ensures only one item has a value.

    Hello,
    I need a validation that ensures that only one item has a value. I want to allow a person entering information into a form to have the option to either select from a drop-down or enter something into a text box but not both.
    I have found some information about validation of this type but I'm not sure how to use it. Here is what I found:
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    This validation ensures that only one item (ITEM_1, ITEM_2) has a value.
    Example 5:
    Assume a function similar to the following exists:
    create or replace function sampleValidation (p_arg in varchar2) return boolean
    as
    begin
    if p_arg= '1' then
    return true;
    else
    return false;
    end if;
    end;
    A validation of type PL/SQL Expression could then reference this function returning a boolean using the following syntax:
    sampleValidation(v('MY_ITEM'))
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Please let me know how to implement this or give me another way to validate.
    Thanks
    Linda

    Linda,
    The best is to use a Validation of type PL/SQL Function Returning Error Text like this:
    BEGIN
       IF :p1_item_1 IS NULL AND :p1_item_2 IS NULL
       THEN
          RETURN 'One of the items must have a value.';
       ELSIF :p1_item_1 IS NOT NULL AND :p1_item_2 IS NOT NULL
       THEN
          RETURN 'Only one of the items must have a value.';
       END IF;
    END;Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Whether the fields of a single row in an internal table has got value.

    I am doing an archiving report in PS Module.
    The table RPSCO has 12 fields which represent each month.The records in the table are based on OBJNR  and YEAR
    Now i need to check for the latest year which month has some value .If any of the month  has got some value i need to take that month.
    Sample table given below.
    OBJNR           year    Month1    month2      month3    so on
    1)PR00002409  2006     0.00     0.00     664.70-     0.00 0.00     0.00     0.00     0.00     0.00                                                                      
    0.00     0.00     0.00     0.00
    2)PR00002409  2005     0.00     0.00     0.00     0.00     0.00     0.00     0.00 0.00     0.00     0.00     48.70     127.20     0.00
    In this case the output should be Month3.Because the latest year is 2006 and Month is Month3.

    Hi Susmita,
    You have to use DO VARYING option from field 3 onwards.
    Below is the sample program to check whether the field has a value or not.
    tables: rpsco.
    data: it_rpsco like rpsco occurs 0 with header line.
    data: v_wlp type rpsco-wlp00,
          v_wtp type rpsco-wtp00,
          v_pos type i.
    select * from rpsco into table it_rpsco where gjahr = '2007'.
    if lines( it_rpsco ) gt 0.
    loop at it_rpsco.
      clear v_pos.
      do 16 times varying v_wlp from it_rpsco-wlp00 next it_rpsco-wlp01
                  varying v_wtp from it_rpsco-wtp00 next it_rpsco-wtp01.
       v_pos = v_pos + 1.
       if not v_wlp is initial.
         write:/5 v_pos , 35 v_wlp, 70 v_wtp.
         exit.
       endif.
      enddo.
    endloop.
    endif.
    Regards,
    Kumar Bandanadham
    Edited by: Velangini Showry Maria Kumar Bandanadham on Jun 1, 2009 9:30 AM

  • The session variable, NQ_SESSION.OU_ORG, has no value definition.Please have your System Administrator look at the log for more details on this error. (HY000)

    Hi All,
    I have created a user 'Bitest' and group 'Bi_Test_Group'. Assigned the user to the group and the group to BI consumer role.
    I gave access to only procurement and spend catalog folder reports and Dashboards.
    When I login to BI Presentation Services with above created user and open any procurement and spent catalog dashboard i am getting below error in every report.
    Its BI Apps 7.9.6.3 installation.I gave read  access to group to all procurement and spent subject area.
    Error Codes: OAMP2OPY:OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P 
    Odbc driver returned an error (SQLExecDirectW). 
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 23006] The session variable, NQ_SESSION.OU_ORG, has no value definition.Please have your System Administrator look at the log for more details on this error. (HY000) 
    SQL Issued: {call NQSGetQueryColumnInfo('SELECT Fact."PO Amount" FROM "Procurement and Spend - Purchase Orders"')}
    SQL Issued: SELECT Fact."PO Amount" FROM "Procurement and Spend - Purchase Orders"
    Please help me in resolving this issue and getting results on Dashboard.
    Thanks in advance
    Thanks,
    Sandeep

    Check your query or connection pool settings etc

  • Error in Explorer "is_ie55up has no value"

    Hi, experts!
    I was changing css and backgrounds and login pictures, when noticed that login screen in Explorer can't open correctly. The same works in Mozilla Firefox. Explorer can't display page correctly, so it give a message about "is_ie55up has no value". Looking in the html-code of that page I saw:
    </script>
    <style type="text/css">.shadowBottom {filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='Missing_sdw_horz.png', sizingMethod='scale');}
    .shadowRight {filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='Missing_sdw_vert.png', sizingMethod='scale');}
    .shadowCorner {filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='Missing_sdw_corner.png', sizingMethod='scale');}</style><title>Oracle Business Intelligence Login</title><link href="Missing_logon.css" type="text/css" rel="stylesheet"></link><script language="javascript" src="Missing_browserDOM.js"></script><script language="javascript" src="Missing_common.js"></script></head>
    <body>
    <script language="javascript">function SAWLogonWait()
    if(is_ie55up) {
    document.body.style.cursor = 'wait';
    if(document.styleSheets.length > 0)
    document.styleSheets[document.styleSheets.length-1].addRule('INPUT.SAWLogonInput','cursor:wait');
    return true;
    I was surprised with the links src=Missing_common.js and src=Missing_browserDOM.js because there should be browserdom.js and common.js.
    Please, give me a prompt how this login html composes (and pointed section)? Could it be the incorrect saw.dll behaviour or some *.xml *.js files have incorrect instructions? Any idea? T__T

    That is something that SVN inserts into a file when it tries to merge its version of a file.
     Simplest thing to resolve this which i tried doing was  ...
    remove any characters "<<<<<<< .mine" or  similar from the file that you will see in your project object  folder namely
    <Projectname>.csproj.FileListAbsolute.txt
    which contains a list of all the paths and recompile ...it worked for me
    You may should read more at
    http://tortoisesvn.tigris.org/faq.html

  • HTMLDB_APPLICATION.G_F01 has wrong value!

    HTMLDB_APPLICATION.G_F01 has wrong value!
    Hello again,
    I have a search page in my app (here the user defines the search criteria) P1.
    The page branches to P130, where the result is shown. This second page contains a region of type 'SQL Query (PL/SQL Function Body Returning SQL Query)'. The code for this dynamic query is 231 lines of code, so I want to spare you scrolling through it here . What it basically does is generating SQL QRY's such as the following:
    select     distinct(sq.SAMPLE_ID) XXX,
    'ID: '||sq.SAMPLE_ID||'
    ' ||'Type: '||sq.SAMPLE_TYPE||'
    ' ||'Collection Date: '||sq.COLLECTION_DATE SAMPLE_INFO,
    'Aliquots (T/A): '||to_char(sq.ALIQUOTS_TOTAL)|| '/' ||to_char(sq.ALIQUOTS_AVAILABLE)||'
    ' ||'Volume (T/A): '||to_char(sq.VOLUME_TOTAL,'990D00')|| '/' ||to_char(sq.VOLUME_AVAILABLE,'990D00') AVAILABILITY,
    'Age: '||sq.PATIENT_AGE||'
    ' ||'Gender: '||sq.PATIENT_SEX||'
    ' ||'Bloodtype: '||sq.BLOOD_TYPE||'
    ' PATIENT_INFO,
    DML_SERVICE.get_Diagnoses(sq.SAMPLE_ID) DIAGNOSES,
    DML_SERVICE.get_Medications(sq.SAMPLE_ID) MEDICATIONS,
    DML_SERVICE.get_Interferences(sq.SAMPLE_ID) INTERFERENCES,
    DML_SERVICE.get_LabData(sq.SAMPLE_ID) LABDATA,
    decode(to_char(sq.ALIQUOTS_AVAILABLE), '0', null, htmldb_item.text(1, '1', 1, 2)) ORDER_QTY,
    decode(to_char(sq.ALIQUOTS_AVAILABLE), '0', null, htmldb_item.checkbox(2,sq.SAMPLE_ID)) ORDER_ME
    from SEARCH_V01 sq
    where sq.DIAGNOSIS = 'D-Dimer'
    order by 1 desc
    The DML_SERVICE functions just return a string(Varchar2). At the right side of the report I have two columns, one with a textfield (ORDER_QTY, default: 1) and one with a checkbox (ORDER_ME) for each line.
    For each line where the checkbox is checked, a process (On Submit - after Comp and Val) places the order for the requested quantity (this is done by inserting an Order ID into the ALIQUOTS table -> see bold update statement below).
    The process follows:
    declare
    alq_qty number;
    alq_id number;
    cnt number;
    begin
    cnt := 0;
    for i in 1..HTMLDB_APPLICATION.G_F02.count
    loop
    select count(*) -- set alq_qty to number of available alq's
    into alq_qty
    from ALIQUOTS a
    where a.SAMPLE_ID = HTMLDB_APPLICATION.G_F02(i)
    and a.ORDER_ID = 0;
    insert into D_DEBUG (ID, DD) values (1, 'wanted: ' || HTMLDB_APPLICATION.G_F01(i) || ' available: ' || alq_qty); -- REMOVE!!!
    if alq_qty > to_number(HTMLDB_APPLICATION.G_F01(i)) then -- if there are enough alq's
    alq_qty := to_number(HTMLDB_APPLICATION.G_F01(i)); -- set alq_qty to number of ordered alq's
    end if;
    for n in 1..alq_qty
    loop
    select min(ID)
    into alq_id
    from ALIQUOTS
    where sample_id = HTMLDB_APPLICATION.G_F02(i)
    and order_id = 0;
    insert into D_DEBUG (ID, DD) values (1, 'alq_id: '||alq_id); -- REMOVE!!!
    update ALIQUOTS
    set order_id = :P130_SELECT_ORDER
    where id = alq_id;
    cnt := cnt + 1;
    end loop;
    dml_service.upd_sample_record(HTMLDB_APPLICATION.G_F02(i)); -- refresh data in SAMPLE table
    end loop;
    :P130_MSG := 'Assigned '||cnt||' aliquots to order: '||:P130_SELECT_ORDER;
    end;
    Now my problem is that this process does what it should, sometimes. When I enter 6 in one row and check the checkbox and enter 4 in another row and check that checkbox and then press SUBMIT, 10 aliquots are assigned to my order.
    Sometimes.... the other times the process just orders 2 aliquots, one of each line and disregards the number entered in the textfield.
    Or so it may seem: I added some lines to write debug info into D_DEBUG (see above.) From those entries you can assume that the content of HTMLDB_APPLICATION.G_F01(i) is in fact '1' when the process does its work. So I think the problem lies somewhere in the creation of htmldb_item.text(), (I went through the API of that htmldb_item again and again...)
    Also: I can reproduce / recreate this error. It's totally weird: for some rows it (always) works and for some it (always) doesn't !!!
    So, any help, any suggestion is really appreciated (I'm currently working on bringing the crucial part of this to marvel.oracle.com)
    -David-
    [Edited by: sleuniss on Jul 15, 2004 12:18 PM]
    Changed subject line.

    Now the subjectline is right, but the indentation is gone.... :-(
    again the SQL query:
    select     distinct(sq.SAMPLE_ID) XXX,
               'ID: '||sq.SAMPLE_ID||'
    ' ||'Type: '||sq.SAMPLE_TYPE||'
    ' ||'Collection Date: '||sq.COLLECTION_DATE SAMPLE_INFO,
               'Aliquots (T/A): '||to_char(sq.ALIQUOTS_TOTAL)|| '/' ||to_char(sq.ALIQUOTS_AVAILABLE)||'
    ' ||'Volume (T/A): '||to_char(sq.VOLUME_TOTAL,'990D00')|| '/' ||to_char(sq.VOLUME_AVAILABLE,'990D00') AVAILABILITY,
               'Age: '||sq.PATIENT_AGE||'
    ' ||'Gender: '||sq.PATIENT_SEX||'
    ' ||'Bloodtype: '||sq.BLOOD_TYPE||'
    ' PATIENT_INFO,
               DML_SERVICE.get_Diagnoses(sq.SAMPLE_ID) DIAGNOSES,
               DML_SERVICE.get_Medications(sq.SAMPLE_ID) MEDICATIONS,
               DML_SERVICE.get_Interferences(sq.SAMPLE_ID) INTERFERENCES,
               DML_SERVICE.get_LabData(sq.SAMPLE_ID) LABDATA,
               decode(to_char(sq.ALIQUOTS_AVAILABLE), '0', null, htmldb_item.text(1, '1', 1, 2)) ORDER_QTY,
               decode(to_char(sq.ALIQUOTS_AVAILABLE), '0', null, htmldb_item.checkbox(2,sq.SAMPLE_ID)) ORDER_ME
    from     SEARCH_V01 sq
    where  sq.DIAGNOSIS = 'D-Dimer'
    order    by 1 desc
    and the process:
    declare
       alq_qty number;
       alq_id number;
       cnt number;
    begin
       cnt := 0;
       for i in 1..HTMLDB_APPLICATION.G_F02.count
       loop
          select count(*) -- set alq_qty to number of available alq's
           into alq_qty
           from ALIQUOTS a
           where a.SAMPLE_ID = HTMLDB_APPLICATION.G_F02(i)
           and a.ORDER_ID = 0;
    insert into D_DEBUG (ID, DD) values (1, 'wanted: ' || HTMLDB_APPLICATION.G_F01(i) || ' available: ' || alq_qty); -- REMOVE!!!
          if alq_qty > to_number(HTMLDB_APPLICATION.G_F01(i)) then -- if there are enough alq's
             alq_qty := to_number(HTMLDB_APPLICATION.G_F01(i)); -- set alq_qty to number of ordered alq's
          end if;
          for n in 1..alq_qty
          loop
             select min(ID)
              into alq_id
              from ALIQUOTS
              where sample_id = HTMLDB_APPLICATION.G_F02(i)
              and order_id = 0;
    insert into D_DEBUG (ID, DD) values (1, 'alq_id: '||alq_id); -- REMOVE!!!
             update ALIQUOTS
              set order_id = :P130_SELECT_ORDER
              where id = alq_id;
             cnt := cnt + 1;
          end loop;
          dml_service.upd_sample_record(HTMLDB_APPLICATION.G_F02(i)); -- refresh data in SAMPLE table
       end loop;
       :P130_MSG := 'Assigned '||cnt||' aliquots to order: '||:P130_SELECT_ORDER;
    end;
    -David-

Maybe you are looking for