How to query two data blocks simultaneously?

Dear all,
Need your inputs on the following problem statement...
Existing Functionality:
We have two data blocks A (Parent) and B (Child) in a relationship. Both data blocks refer to different tables.
Data block A is the query data block and for a single record in block A we can have multiple records in block B. Multiple records in block B are shown one at a time after executing a query, this is implemented by using a list item C (belongs to a third block).
For example
Let us say block B can have 5 different types of entries for each record in block A. In this case the list item C will have 5 values corresponding to these entries. Once the query is executed, block B will show the default entry for the queried record in block A. To see other entries for the record user can select the required value in list item C and corresponding entry in block B will be fetched.
Requirement:
Our requirement now is to enable querying upon both data blocks A and B simultaneously. To implement this I replaced data blocks A and B with a single data block X which is based on the join of the two tables referred by the Data blocks A and B earlier. As the fields should allow insert, update, delete operations we did not use a view here.
Issue:
Now the problem is, each record in block A for which block B had multiple entries earlier is now getting listed multiple times because of the join.
I have tried but could not find any solution for this. I would appreciate if any of you can suggest how we can query both blocks simultaneously without affecting the existing functionality.
Thanks,
Amit

I don't understand your requirement in detail. I try to repeat what i understood so far.
You have a master-block A based on a table A and a detail-block B based on a table B. So far so good. You can now query based on conditions just the datablock A, because B is a detail and therefore can only be queryied in context of block A.
Your reuirement is to query on both blocks A and B and find block in B also without giving conditions for the relevant block A.
Is it that ?
What i don't understand, what is block C used for?
An idea for the querying of block B's data: Create Non-database-items items in block A for the search-criteria you need on block B and make them Queryable.
In the PRE-QUERY-trigger on block A build a WHERE-condition if that search-criteria is entered, something like
IF :BLOCK_A.SEARCH_CRITERIA_FOR_BLOCK_B IS NOT NULL THEN
  SET_BLOCK_PROPERTY('BLOCK_A', ONETIME_WHERE, 'WHERE PKVALUE IN (SELECT FKVALUE_TO_A FROM TABLE_B WHERE FIELDVALUE=' ||:BLOCK_A.SEARCH_CRITERIA_FOR_BLOCK_B)');
END IF;This would query also records to A for which you want to have the B-records. So you could keep block-structure up to master-detail.

Similar Messages

  • How to call two data blocks at a time.

    hi all
    i want to call two data blocks at a time on function when button pressed.
    how can I it?
    many thanks

    Many thanks that you people reply,
    I am working in oracle form developer 6i and database 10g.
    I have a form that have three data blocks,
    first block have text boxes and search button,and next two blocks display records on the basis of search criteria that is inserted in the first block and when is clicked on save button.
    the data that is to b displayed is from two different tables.
    i used Go_block('my_block')
    and call other block with the same method.
    kindly guide me how can i do it.
    Thanks in advance

  • How can we scroll two data blocks..?

    HI,
    Can any one please help if it is possible to scroll two data blocks at the same time? Like I got two blocks . One block 'Block1' has list of products .Its a multiple record block.The other is like a details block 'Block2'. It's also a multiple record block but it has got more than one record for each record in 'Block1'.So what I need is if the user scrolls through 'Block1' then the corresponding 'Block' should also be scrolled to corresponding detail records.
    Iam not sure if its possible or not. So can any one please help me with this.
    Thanks in advance,
    Karlos

    Agree,
    what you are looking for is master-detail. If you have a realtionship defined in the database then Forms will automatically pick up this condition and set the relation. Just add each table as a block onto the canvas
    Frank

  • How to Compare two Dates in java

    How to Compare two Date Field after getting the values from jTextField1.getText() and jTextField2.getText().

    Date d1=DateFormat.getDateInstance().parse(yourstring1);
    same for d2
    d1.compareTo(d2);
    could be that i misrememberd the exact naems of some functions or mixed up something in the equence of d1=

  • Query in data block

    hi,
    whether it's possible to write query in data block other than trigger.(i.e,.. data block created by the Wizard and executing a simple query over the data block based on a table)
    regards
    Yesukannan

    if i am right about u question , you can change your datablock sorce prooperty to QUERY and in soruce wirte ur query
    Block Property
    Database source- Query
    source table name:- write u query

  • How to query XML data stored in a CLOB column

    I don't know XMLDB, so I have a dumb question about querying XML data which is saved as CLOB in a table.
    I have a table (OLAP_AW_PRC), with a CLOB column - AW_XML_TMPL_VAL
    This column contains this xml data - [click here|http://www.nasar.net/aw.xml]
    Now I want to query the data using the xml tags - like returning the name of AW. This is where I am having trouble, how to query the data from AW_XML_TMPL_VAL clob column.
    The following query generates error:
    ORA-31011: XML parsing failed.
    ORA-19202: Error occurred in XML processing
    LPX-00229: input source is empty
    SELECT
    extractValue(value(x), '/AW/LongName') as "AWNAME"
    from
    OLAP_AW_PRC,
    table(xmlsequence(extract (xmltype(AW_XML_TMPL_VAL), '/AWXML/AWXML.content/Create/ActiveObject/AW'))) x
    where
    extractValue(value(x) , '/AW/Name') = 'OMCR4'
    - Nasar

    Mark,
    Thanks. This is exactly what I was looking for.
    After doing @Name in both places (SELECT and WHERE clause) it worked.
    Now I have one more question.
    There are multiple DIMENSION tags in my xml, and I want to see the NAME attribute values for all of those DIMENSIONs. The following query returns
    ORA-19025: EXTRACTVALUE returns value of only one node.
    Cause: Given XPath points to more than one node.
    Action: Rewrite the query so that exactly one node is returned.
    SELECT
    extractValue(value(x), '/AW/@Name') as "AW",
    extractValue(value(x), '/AW/Dimension/@Name') as "DIMENSIONS"
    from
    OLAP_AW_PRC,
    table(xmlsequence(extract (xmltype(AW_XML_TMPL_VAL), '/AWXML/AWXML.content/Create/ActiveObject/AW'))) x
    where
    extractValue(value(x) , '/AW/@Name') = 'OMCR4'

  • How to compare two dates that should not exceed morethan 3 years

    hi all,
    can you please tell me how to compare two dates( basically dates are string type)
    that should not exceed more than 3 years? in JAVASCRIPT
    Thanks in Advance.

    This is not a JavaScript forum.
    [*Google* JavaScript Forum|http://www.google.co.uk/search?q=JavaScript+Forum&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a]
    Good luck.

  • How to compare two dates to know which one is greater than oher?

    how to compare two dates to know which one is greater than oher?
    Please search before asking basic questions.
    Edited by: Rob Burbank on Mar 27, 2009 9:26 AM

    Hi,
    If thse to date fields are of same type u can directly compare like this.
    regards,
    Bharat.

  • Query based Data Block?

    I have a situation where on the detail portion of the screen, I need to have fields from 2 tables shown that can be updated. The 2 tables are related through a foreign key. Can you have a data block based upon a query? If so, how... Thanks.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Richard Shannon ([email protected]):
    I have a situation where on the detail portion of the screen, I need to have fields from 2 tables shown that can be updated. The 2 tables are related through a foreign key. Can you have a data block based upon a query? If so, how... Thanks.<HR></BLOCKQUOTE>
    Hello,
    there is two way to do the same. one is, you need to create a view in database based on both the tables and then create a data block based on that view. to update the value of specific column there is trigger instead-of, u can create this trigger on view and manipulate the corresponding table.
    second is, create a data block based on virtual view same as fisrt one and write corresponding dmls in transactional trigger to update the information in actual tables.
    i hope that it will help you to achieve the same.
    take care
    null

  • How to query the master block based on one of the values in detail block

    Hi,
    In version 6i forms, I have a field in data block which is not set as a database item. I am using that field to store a value from detail block. If I want to query the form using that field (which represents one of the values from detail block), how do I do that? Any pointers?
    TIA,

    Do you want to query a master, which contains a specific detail? If so, here's an example how you could do it with a PRE-QUERY-trigger:
    DECLARE
      vcQuery VARCHAR2(4000);
    BEGIN
      IF :MASTERBLOCK.THE_DETAIL_SEARCH_ITEM IS NOT NULL THEN
        -- Build up an exists Sub-Query
        vcQuery:=' MASTERBLOCKID IN (SELECT FK_TO_MASTERBLOCK FROM DETAILTABLE WHERE DETAIL_COLUMN=''' || :MASTERBLOCK.THE_DETAIL_SEARCH_ITEM|| ''')';
      END IF;
      SET_BLOCK_PROPERTY('MASTERBLOCK', DEFAULT_WHERE, vcQuery);
    END;

  • How to run two sub vi simultaneously??

    i need to run two sub vi simultaneously in one main vi, becasue it is a must the two sub vi run exactly at the same time, but now i find that if i put they in one diagram ,in fact they are not exactly run at the same time. if you see in high light mode Just like the attached simple example code.  any one can help me to handle this to run the two subvi exactly at  the same time ? how to do it ? thanks so much.
    Attachments:
    how to run subvi simultaneously.vi ‏11 KB

    You are correct, they will not run at exactly the same time.  What is it you are actually trying to do?  What platform are you developing on? What version of LabVIEW? What processor does your target system have? This information is vital in order for us to assist you.  In a nutshell, unless you are running a real-time OS, then the OS you are running is not deterministic.  When you say "at the same time", what are you actually referring to? As a note, when executing parrallel operations in LabVIEW, the execution order may or may not be the same with the highlight bubble on as it is when it is running without highlight execution.  It is highly unlikely that you will be able to just run two sub-vis at the exact same nS.  If you are using DAQ boards, you accomplish this through triggering.  Please give a detailed description of what you are doing, and what you see the road blocks being.
    Thanks
    Paul <--Always Learning!!!
    sense and simplicity.
    Browse my sample VIs?

  • How to syncronize two data acquisition boards?

    I would like to know how I can use two Multifunction Boards simultaneously? For example, I had two NI6024 boards and I would like to use 16/DI channels. I want to syncronize them. Thank you.

    Youngkey,
    You can synchronize the two data acquisition boards, by using the RTSI bus that is part of the architecture of the boards. I am attaching the text of a Knowledge Base which describes how to accomplish this goal:
    Title:
    Synchronizing data acquisition between two or more MIO-16 series boards
    Problem:
    How can I synchronize data acquisition between two or more MIO-16 series boards?
    Solution:
    First, place a special Real-Time System Integration (RTSI) cable on the RTSI connector. Then, determine what trigger pulse signals need to transmitted to the trigger inputs of each MIO-16 series board. The board which sends the trigger signal becomes a 'master' and the board that rec
    eives becomes a 'slave'. Finally, start the data acquisition on both boards. Make sure you call the data acquisition functions or VIs on the slave board first to arm the acquisition. Below is a list of necessary function calls.
    * In NI-DAQ or LabWindows: Call the function RTSI_Conn for each counter or trigger signal you wish to connect up to a RTSI Trigger Line. Then call the regular functions to perform a data acquisition on both boards. Call the function RTSI_Clear at the end of the program.
    * In LabVIEW: Call the RTSI Control VI with control code set to Connect for each counter or trigger signal you wish to connect up to a RTSI Trigger Line. Then call the regular VIs to perform a data acquisition on both boards. Call the RTSI Control VI with Control Code set to Clear at the end of the program.
    Hope this information is helpful.
    L Aguila
    Applications Engineer
    National Instruments

  • Difference between records in two data blocks

    Can you suggest me the best method to find difference (minus) between records in two similar data blocks.
    Thanks!

    What's your database version? Does this work? It can make the job a lot easier as you only have to loop through each block once.
    -- create collection types
    CREATE TYPE myobj AS object(col1 NUMBER, col2 NUMBER);
    CREATE TYPE mytab AS TABLE OF myobj;
    -- in the form:
    DECLARE
      b1 mytab := mytab();
      b2 mytab := mytab();
    BEGIN
      -- loop through blocks and populate collections
      b1.extend;
      b1(1) := myobj(1,1);
      b1.extend;
      b1(2) := myobj(2,1);
      b1.extend;
      b1(3) := myobj(3,5);
      b1.extend;
      b1(4) := myobj(4,2);
      b2.extend;
      b2(1) := myobj(1,1);
      b2.extend;
      b2(2) := myobj(2,2);
      b2.extend;
      b2(3) := myobj(3,5);
      -- find the difference (you might need to pass collections as parameters to a
      -- server-side function and do the query there)
      FOR rec IN (
        SELECT col1, col2 FROM TABLE(CAST(b1 AS mytab))
        MINUS
        SELECT col1, col2 FROM TABLE(CAST(b2 AS mytab))
      ) LOOP
        Dbms_Output.put_line(rec.col1||'-'||rec.col2);
      END LOOP;   
    END;
    /

  • How to substract two date&time values

    Well,i just need to substract last visited date&time value from systemdate. The last visited date&time(from the filed named SONBULUNMAZAMANI, ) is selected from table (IHALE_KATILIMCILAR ) in the format DD-MM-RRRR HH24:MI and systemdate is in the same format. And i need to get value in minutes. Then i need to check if the value is greater then 20 minutes, finally i will update database and set IHALE_KATILIMCILAR.AKTIF=0. Here is the code i used;
    DECLARE
    MinDiff number;
    DateTime1 ihale_katilimcilar.sonbulunmazamani%TYPE;
    BEGIN
    select t.sonbulunmazamani into DateTime1 from ihale_katilimcilar t where t.ihlkodu=141 and t.ihlaltktgkodu=132 and t.id_iliski=193;
    MinDiff := ABS( TO_DATE( TO_CHAR(SYSDATE, 'DD-MM-RRRR') || TO_CHAR(SYSDATE , 'HH24:MI'), 'DD-MM-RRRR HH24:MI' ) - TO_DATE( TO_CHAR(DateTime1, 'DD-MM-RRRR') || TO_CHAR(DateTime1, 'HH24:MI'), 'DD-MM-RRRR HH24:MI' ) );
    DBMS_OUTPUT.PUT_LINE('Difference is ' || MinDiff);
    END;
    However the result i get is always pointed values such as ,1895833333333333333333333333333333333333. How can i handle this?
    And here is the scripts of table:
    create table IHALE_KATILIMCILAR
    KULADI VARCHAR2(20),
    SONUC NUMBER(1),
    AKTIF NUMBER(1) default 1,
    SRKTKODU VARCHAR2(10) not null,
    SONBULUNMAZAMANI DATE default sysdate,
    SIRA NUMBER(1) default 0,
    MESAJ VARCHAR2(200),
    ID NUMBER(6) not null,
    IHLKODU NUMBER not null,
    IHLALTKTGKODU VARCHAR2(10) not null,
    ID_ILISKI NUMBER,
    IHLSIRA NUMBER(1) default 0,
    CEVAP VARCHAR2(200)
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('asd', null, 1, '4444', to_date('19-02-2008 10:29:44', 'dd-mm-yyyy hh24:mi:ss'), 0, 'süre talep 2', 76, 145,
    '135', 345, 0, 'al sna süre 77');
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('asd', null, 1, '4444', to_date('20-02-2008 14:49:52', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 77, 145, '135',
    345, 0, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('asd', null, 1, '4444', to_date('19-02-2008 10:29:44', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 78, 145, '135',
    345, 0, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('asd', null, 1, '4444', to_date('19-02-2008 10:29:44', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 79, 145, '135',
    345, 0, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KEMMM', null, 0, '42', to_date('17-03-2008 09:29:20', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 63, 141, '134',
    191, 0, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('MLK', null, 1, '46', to_date('07-03-2008 09:52:20', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 64, 141, '134', 192,
    0, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KEM.ESM', null, 1, '44', to_date('06-03-2008 13:28:50', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 61, 145, '135',
    189, 0, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KE.ES', null, 1, '45', to_date('07-03-2008 11:16:41', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 69, 141, '133',
    197, 0, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KEMMM', null, 0, '42', to_date('17-03-2008 09:29:20', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 65, 141, '132',
    193, 1, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KE.ES', null, 1, '45', to_date('07-03-2008 11:16:41', 'dd-mm-yyyy hh24:mi:ss'), 2, null, 66, 141, '132',
    194, 1, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('MLK', null, 1, '46', to_date('07-03-2008 09:52:20', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 67, 141, '132', 195,
    1, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KEMMM', null, 0, '42', to_date('17-03-2008 09:29:20', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 68, 141, '133',
    196, 0, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KEM.ESM', null, 1, '44', to_date('12-03-2008 15:00:58', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 70, 142, '252',
    198, 1, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KE.ES', null, 1, '45', to_date('10-03-2008 10:08:17', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 71, 142, '252',
    199, 1, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KEM.ESM', null, 1, '44', to_date('10-03-2008 10:08:56', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 72, 143, '253',
    200, 1, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('MLK', null, 1, '46', to_date('12-02-2008 13:34:40', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 73, 143, '253', 201,
    1, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KE.ES', null, 1, '45', to_date('06-03-2008 14:09:40', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 60, 145, '136',
    188, 1, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KEM.ESM', null, 1, '44', to_date('06-03-2008 13:28:50', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 74, 145, '136',
    202, 1, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KE.ES', null, 1, '45', to_date('06-03-2008 14:09:40', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 75, 145, '135',
    203, 0, null);
    Thanks...

    What version of SQLServer do you have? Datediff is not an Oracle built-in function.
    OP:
    THe difference between two dates in Oracle is in days. The decimal portion refers to partial days, so you need to convert that to the required precision. Also, both sysdate and your column are date type, and contain a time portion, so you do not need all the to_date/to_char stuff. Something like:
    SQL> SELECT end_dt, start_dt, (end_dt - start_dt) * 24*60 diff
      2  FROM (SELECT sysdate end_dt, TRUNC(sysdate) start_dt
      3        FROM dual);
    END_DT             START_DT                 DIFF
    17-mar-08 10:39:39 17-mar-08 00:00:00     639.65John

  • How to compare two date Objects

    Hi,
    I have two Calendar Objects, one is coming from client and one is my server time, I need to evaluate that incoming time with server time so that if it is sent before an hour back then i should not do anything on that request Object. I have converted the incoming String into Calendar Object and how can i evaluate these two Calendar Objects including their hours and minutes.
    Thanks in advance
    bajju

    bajjurireddy, ignore Mobiquity's post. It contains no useful information and will only serve to confuse and frustrate you.
    Mobiquity wrote:
    Also make sure that the two date objects are in the same date format..
    public static String DateToDateString(java.util.Date d, String dateFormat)
         throws ParseException {
              SimpleDateFormat sdf = new SimpleDateFormat(dateFormat);
              sdf.setLenient(false); // this is required else it will convert
              String dateString = sdf.format(d);
              return dateString;

Maybe you are looking for