CachedRowSet date field and SyncResolver

When I attempt to accept changes to my CachedRowSetImpl I get conflict errors if my query includes a date field.I assume this is some sort of precision error. To get around this problem I attempt to catch the SyncProviderException. My code is copied directly from the JavaDoc for SyncResolver with the exception. Now I get this error
java.sql.SQLException: Invalid cursor position
     at com.sun.rowset.CachedRowSetImpl.rowDeleted(CachedRowSetImpl.java:3893)
     at com.sun.rowset.CachedRowSetImpl.internalPrevious(CachedRowSetImpl.java:3766)
     at com.sun.rowset.CachedRowSetImpl.previous(CachedRowSetImpl.java:3731)
     at com.sun.rowset.internal.SyncResolverImpl.nextConflict(SyncResolverImpl.java:461)
     at aims.app.reefmonitoring.db.MasterSampleRowSet.save(MasterSampleRowSet.java:98)
This is my code
try {
this.acceptChanges(con);
} catch (SyncProviderException spe) {
SyncResolver resolver = spe.getSyncResolver();
// Object crsValue; // value in the RowSet object
Object resolverValue; // value in the SyncResolver object
Object resolvedValue; // value to be persisted
try {
int row = resolver.getRow();
while(resolver.nextConflict()) {
if(resolver.getStatus() == SyncResolver.UPDATE_ROW_CONFLICT) {
row = resolver.getRow();
// this.absolute(row);
int colCount = this.getMetaData().getColumnCount();
for(int j = 1; j <= colCount; j++) {
if (resolver.getConflictValue(j) != null) {
// crsValue = this.getObject(j);
resolverValue = resolver.getConflictValue(j);
// compare crsValue and resolverValue to determine
// which should be the resolved value (the value to persist)
resolvedValue = resolverValue;
resolver.setResolvedValue(j, resolvedValue);
catch (SQLException e) {
e.printStackTrace();
}

Call rowset.acceptChanges() on the rowset (not the SyncResolver) to synchronize changes with the database using the new resolved values.

Similar Messages

  • Data fields and key fields

    Hi,
    Data fields and key fields are same as Characteristcs and key figures? Or they are diffrerent?
    Thanks,
    Radha

    HI
    Key Fields =  Acts as Primary Key for The ODS like Primary of Tables in R3.
    Data fields =  Apart from Key fields We consider rest as data fields.
    Ususally we use Characteristic info Objects and Dates in Key Fields and Key figures in Data fields.
    It's decisive factor for overwriting property of ODS or DOS.
    Hope this helps.
    Regards,
    Rangzz
    Edited by: Ranganath Kodiugane on Feb 7, 2009 12:14 PM

  • Purchase Order released date field and table name

    Hi,
    Please tell me the  Purchase Order released date field and table name.
    Regards
    Deepak

    Hi,
    Table : EKKO.
    Fields : FRGKE,FRGZU.
    You can get release date of PO from CDHDR  table.
    give object value as your po number and check.dont forget to give leading zeros.
    The udate will be date field and transaction will be me29n for relaesed po.

  • F4 help for Date field and Validation

    Hi Friends,
    I am new to BSP programming .I knew getting F4 help in normal ABAP.But i don't know in BSP .
    I want simple steps to get F4 for a field on Page as well as date field .
    and How to valid those entered dates.
    Presently i am using length 10 character variable for DATE without F4 help and No validation.
    I think you guys will help me out.
    Thanks,
    Venkat.O

    Welcome to SDN.
    for F4 help with validation for dates you can use the following code.
    <htmlb:inputField id         = "wf_ad_date"
                                    type       = "date"
                                    showHelp   = "TRUE"
                                    value = "<%= sy-datum  %>"
                                    visible    = "true"
                                    disabled   = "false"
                                    required   = "true"
                                    maxlength  = "10"
                                    size       = "10"
                                    doValidate = "true"
                                    design     = "standard" />
    For other type of fields check out this weblog by Thomas Jung
    <a href="/people/thomas.jung3/blog/2005/08/22/bsp-value-input-help-popups-version-30 Value Input Help Popups Version 3.0</a>
    Regards
    Raja

  • Date fields and compare and get the later date of the fields

    I am trying to compare these date fields and compare and get the later date of the fields
    Tables are
    TABCASER
    TABCASER1
    EVCASERS
    Field
    Are
    TABCASER1.CASER_no
    The dates are to be compared and then get the records with the highest or latest date value.
    TABCASER1.CASERRECIEVEDDATE
    EVCASERS.FINALEVDATES
    EVCASERS.PUBLICATIONDATE
    EVCASERS.PUBLICATIONDATE
    TABCASER.COMPAREACCEPDATE
    I have this code but I am trying to figure out what it all means.
    I have several questions.
    1.
    1.     greatest it is used here to compare right? How do I then output this ? do I store it to a var (coldfusion) ultimately , I wish to send it to a page of records
    2.     is it necessary to use todate? And to_date? What does this do?
    3.     decode, is this necessary too. What does this do? NULL?
    4.     
    5.     
    6.     when I do get the query results how do I send it to coldsuion and out put to a display.
    Someone sent me this code.
    is there abetter way of doing this? To compare the dates and store in a var to display. thanks
    Here is my code below:
    Greatest(
         CASE
              WHEN INSTR(TABCASER1.CASER_no,'-CE') > 0 THEN
         decode(TABCASER1.CASERRECIEVEDDATE,NULL,TO_DATE('01/01/1900','mm/dd/yyyy'),TABCASER1.CASERRECIEVEDDATE)
                             WHEN INSTR(TABCASER1.CASER_no,'-ERNIE') > 0 THEN
         decode(EVCASERS.FINALEVDATES,NULL,TO_DATE('01/01/1900','mm/dd/yyyy'),EVCASERS.FINALEVDATES)
                             WHEN INSTR(TABCASER1.CASER_no,'-MONIE') > 0 THEN
         decode(EVCASERS.PUBLICATIONDATE,NULL,TO_DATE('01/01/1900','mm/dd/yyyy'),EVCASERS.PUBLICATIONDATE)
                             WHEN INSTR(TABCASER1.CASER_no,'-NADINE') > 0 THEN
         decode(EVCASERS.PUBLICATIONDATE,NULL,TO_DATE('01/01/1900','mm/dd/yyyy'),EVCASERS.PUBLICATIONDATE)
                             ELSE
         decode(TABCASER.COMPAREACCEPDATE,NULL,TO_DATE('01/01/1900','mm/dd/yyyy'),TABCASER.COMPAREACCEPDATE)
                        END
              ,decode(TABCASER.COMPAREACCEPDATE,NULL,TO_DATE('01/01/1900','mm/dd/yyyy'),TABCASER.COMPAREACCEPDATE))
              between TO_DATE('#dateformat(form.startDate,"mm/dd/yyyy")#','MM/DD/YYYY') and TO_DATE('#dateformat(form.endDate,"mm/dd/yyyy")#','MM/DD/YYYY')
    is there abetter way of doing this? To compare the dates and store in a var to display. thanks

    Hi
    If you have date datatypes than:
    select
    greatest(TABCASER1.CASERRECIEVEDDATE, EVCASERS.FINALEVDATES, EVCASERS.PUBLICATIONDATE, EVCASERS.PUBLICATIONDATE, TABCASER.COMPAREACCEPDATE)
    from TABCASER, TABCASER1, EVCASERS
    where ...-- join and other conditions
    1. greatest is good enough
    2. to_date creates date dataype from string with the format of format string ('mm/dd/yyyy')
    3. decode(a, b, c, d) is a function: if a = b than return c else d. NULL means that there is no data in the cell of the table.
    6. to format the date for display use to_char function with format modell as in the to_date function.
    Ott Karesz
    http://www.trendo-kft.hu

  • Auto Date field and Auto Number field

    I am fairly new to this,
    I have crated a form using the form wizard in Acrobat Pro 9.0 and I would like to make a field an Auto date field and another an Auto Numbering field. I have read a lot of the posts and there are a lot of recommendation to point the auto number to a database. This is fine but I do not know how to reference that field to an external database. PLEASE HELP!!!! Somebody GEEK me!!

    I am fairly new to this,
    I have crated a form using the form wizard in Acrobat Pro 9.0 and I would like to make a field an Auto date field and another an Auto Numbering field. I have read a lot of the posts and there are a lot of recommendation to point the auto number to a database. This is fine but I do not know how to reference that field to an external database. PLEASE HELP!!!! Somebody GEEK me!!

  • "Amount, currency, and date fields and service provider reset"

    Hi all,
    I am trying to save a trip request via TCode: TRIP but receive the following message:
    "Amount, currency, and date fields and service provider reset"   Messsage no. PTRA_WEB_INTERFACE150
    The system is on ECC6.0 with IS-PS (i.e. Funds management activated).
    Anyone encountered this previously - hope you can share your solution.
    Thanks in advance.

    Hi
    I am also facing the same and checked the table mention below and dates are same but still facing the error "Amount, currency, and date fields and service provider reset" along with other error message i.e "Expense type not allowed (T70S_RECEIPT)" .
    Please guide .
    V_T706B1
    V_T706B1_A
    V_T706B1_B
    V_T706B4
    V_T706B4_A

  • Generic Delta without date field and without document number

    Hi Experts,
    I have created Funtion Module Extractor program, but my strcture not having any date field and document number fields.
    Please let me know how to maintain the delta for extractor program.
    Thanks in Advance.
    Chandra

    hi,
    it is not mandatory to have doc number or date fields for delta,
    u must have other fields which could change and try to find those fields and try, chk with the business for their delta requirement else go with full load.
    Ramesh

  • Extract Year (only) from Date Field and Display in Text Field

    I need to extract the year from a user entered date field and display the year in a text field. Can someone help me with the correct script to do this?

    Hi,
    that's quite easy to realize with FormCalc.
    In you date fields exit event add the following code:
    textField1 = Num2Date( Date2Num($.formattedValue, "MM/DD/YYYY"), "YYYY")
    Note: This sample assumes that your date field formats the date with "MM/DD/YYYY". You may have to change the pattern to make it work at your end.

  • Working days between two date fields and Changing Factory Calendar

    Hi,
    I have to calculate working days between two date fields excluding the weekends and public holidays for Switzerland.
    I have written the routine using factory calender and its working fine except for two problems now:
    1. If any one of the date field is empty then teh rsult should be zero.
    2. And the below code is working from 1996 but my cleints wants it to work for years before 1996 as well.
    I also tried to change the Start date in SCAL for factory calendar but it says enter values between 1995 to 2020.
    I am new to ABAP. Please help me how i can achieve these for below code.
    DATA: IT_HOLIDAYS type TABLE OF ISCAL_DAY,
          IS_HOLIDAYS TYPE ISCAL_DAY.
    DATA: T_DATE TYPE SY-DATUM,
          P_DATE TYPE SY-DATUM.
    DATA : X_DATE(4) TYPE C.
    DATA: CNT TYPE I.
    REFRESH : IT_HOLIDAYS.
    CLEAR : IT_HOLIDAYS.
    T_DATE = SOURCE_FIELDS-/BIC/ZCCCHP812.
    P_DATE = SOURCE_FIELDS-/BIC/ZCCCHP810.
    CALL FUNCTION 'HOLIDAY_GET'
    EXPORTING
    HOLIDAY_CALENDAR = 'CH'
    FACTORY_CALENDAR = 'CH'
    DATE_FROM = P_DATE
    DATE_TO   = T_DATE
    TABLES
    HOLIDAYS = IT_HOLIDAYS
    EXCEPTIONS
    FACTORY_CALENDAR_NOT_FOUND = 1
    HOLIDAY_CALENDAR_NOT_FOUND = 2
    DATE_HAS_INVALID_FORMAT = 3
    DATE_INCONSISTENCY = 4
    OTHERS = 5.
    DESCRIBE TABLE IT_HOLIDAYS LINES CNT.
    X_DATE = T_DATE - P_DATE - CNT.
    RESULT = X_DATE.
    Please help
    Regards
    Zabina
    Edited by: Syed786 on Nov 2, 2011 9:15 AM

    Hi Zabina,
    Try this function module  'DURATION_DETERMINE'.
    Give the factory calendar and unit as DAY
    With regards,
    Rajesh

  • DATE fields and LOG files  in context with external tables

    I am facing two problems when dealing with the external tables feature in Oracle 9i.
    I created an External Table with some fileds with the DATE data type . There were no issues during the creation part. But when i query the table, the DATE fields are not properly selected though the data is there in the files. Is there any ideas to deal with this ?
    My next question is regarding the log files. The contents in the log file seems to be growing when querying the external tables. Is there a way to control this behaviour?
    Suggestions / Advices on the above two issues are welcome.
    Thanks
    Lakshminarayanan

    Hi
    If you have date datatypes than:
    select
    greatest(TABCASER1.CASERRECIEVEDDATE, EVCASERS.FINALEVDATES, EVCASERS.PUBLICATIONDATE, EVCASERS.PUBLICATIONDATE, TABCASER.COMPAREACCEPDATE)
    from TABCASER, TABCASER1, EVCASERS
    where ...-- join and other conditions
    1. greatest is good enough
    2. to_date creates date dataype from string with the format of format string ('mm/dd/yyyy')
    3. decode(a, b, c, d) is a function: if a = b than return c else d. NULL means that there is no data in the cell of the table.
    6. to format the date for display use to_char function with format modell as in the to_date function.
    Ott Karesz
    http://www.trendo-kft.hu

  • Concatenate 2 data fields and put values in single line

    Hello,
    I am pretty new to BI Publisher. I want to concatenate 2 data fields (Product and ProductType). These concatenated values then I want to put them on a single line.
    eg.
    the values should look like
    ProductType1.Product1,ProductType2.Product2, ProductType3.Product3..........
    Thanks.

    The XML is
    - <ServiceAgreement>
    <AccountId>1-abcde</AccountId>
    <AgreementNumber>1-685</AgreementNumber>
    <AgreementStartDate>07/08/2010 13:46:18</AgreementStartDate>
    <AgreementStatus>Awaiting</AgreementStatus>
    <ContactFirstName />
    <ITIStreetAddress />
    <ITIStreetNumber />
    - <ListOfOrderEntry-Orders>
    - <OrderEntry-Orders>
    <ITIMoneyToCollect />
    <OrderDate>07/08/2010 13:46:53</OrderDate>
    <OrderNumber2>1-685579</OrderNumber2>
    <OrderStatus>Pending</OrderStatus>
    <OrderType>Sales Order</OrderType>
    - <ListOfOrderEntry-LineItems>
    - <OrderEntry-LineItems>
    <OrderType2>Sales Order</OrderType2>
    <ProdPromName />
    <Product>Hollywood 18m</Product>
    <ProductType />
    <PromotionId>123456</PromotionId>
    <ServiceId />
    </OrderEntry-LineItems>
    - <OrderEntry-LineItems>
    <OrderType2>Sales Order</OrderType2>
    <ProdPromName>Hollywood 18m</ProdPromName>
    <Product>n TV</Product>
    <ProductType>Root</ProductType>
    <PromotionId />
    <ServiceId />
    </OrderEntry-LineItems>
    - <OrderEntry-LineItems>
    <OrderType2>Sales Order</OrderType2>
    <ProdPromName />
    <Product>HBO + nFilmHD</Product>
    <ProductType />
    <PromotionId />
    <ServiceId />
    </OrderEntry-LineItems>
    - <OrderEntry-LineItems>
    <OrderType2>Sales Order</OrderType2>
    <ProdPromName />
    <Product>HBO</Product>
    <ProductType>Opcje dodatkowe</ProductType>
    <PromotionId />
    <ServiceId />
    </OrderEntry-LineItems>
    - <OrderEntry-LineItems>
    <OrderType2>Sales Order</OrderType2>
    <ProdPromName />
    <Product>nFilmHD</Product>
    <ProductType>Opcje dodatkowe</ProductType>
    <PromotionId />
    <ServiceId />
    </OrderEntry-LineItems>
    - <OrderEntry-LineItems>
    <OrderType2>Sales Order</OrderType2>
    <ProdPromName />
    <Product>nbox HDTV</Product>
    <ProductType>Dekoder</ProductType>
    <PromotionId />
    <ServiceId />
    </OrderEntry-LineItems>
    - <OrderEntry-LineItems>
    <OrderType2>Sales Order</OrderType2>
    <ProdPromName />
    <Product>Cinemax</Product>
    <ProductType>Opcje dodatkowe</ProductType>
    <PromotionId />
    <ServiceId />
    </OrderEntry-LineItems>
    - <OrderEntry-LineItems>
    <OrderType2>Sales Order</OrderType2>
    <ProdPromName />
    <Product>Filmbox</Product>
    <ProductType>Opcje dodatkowe</ProductType>
    <PromotionId />
    <ServiceId />
    </OrderEntry-LineItems>
    - <OrderEntry-LineItems>
    <OrderType2>Sales Order</OrderType2>
    <ProdPromName />
    <Product>Upust za zakup 3-ego pakietu</Product>
    <ProductType>Upusty</ProductType>
    <PromotionId />
    <ServiceId />
    </OrderEntry-LineItems>
    - <OrderEntry-LineItems>
    <OrderType2>Sales Order</OrderType2>
    <ProdPromName />
    <Product>Pakiet Informacja i Rozrywka</Product>
    <ProductType>Pakiety</ProductType>
    <PromotionId />
    <ServiceId />
    </OrderEntry-LineItems>
    - <OrderEntry-LineItems>
    <OrderType2>Sales Order</OrderType2>
    <ProdPromName />
    <Product>Opłata aktywacyjna za nbox HDTV</Product>
    <ProductType />
    <PromotionId />
    <ServiceId />
    </OrderEntry-LineItems>
    - <OrderEntry-LineItems>
    <OrderType2>Sales Order</OrderType2>
    <ProdPromName />
    <Product>Pakiet Dzieci</Product>
    <ProductType>Pakiety</ProductType>
    <PromotionId />
    <ServiceId />
    </OrderEntry-LineItems>
    - <OrderEntry-LineItems>
    <OrderType2>Sales Order</OrderType2>
    <ProdPromName />
    <Product>Pakiet Sport i Motoryzacja</Product>
    <ProductType>Pakiety</ProductType>
    <PromotionId />
    <ServiceId />
    </OrderEntry-LineItems>
    </ListOfOrderEntry-LineItems>
    </OrderEntry-Orders>
    </ListOfOrderEntry-Orders>
    </ServiceAgreement>
    </ListOfBipServiceAgreement>
    As per the above XML I want to see
    Pakiet Dzieci.Pakiety , Pakiet Sport i Motoryzac ja.Pakiety.....
    Thanks

  • Display difference of a Date field and today's date in the query

    hi experts,
    I have a query which has a date field called 'Effective Date.'
    I just need to a add a column in the query that shows me the diffenrence between 'Effective Date' and the date the query is run (key date).
    Do i need a custom exit to accomplish this?
    The new column can either display the number days elapsed from 'Effective Date' to the key date or it can also display Number of Years/ Months / days.
    Any ideas?
    Thanks,

    Check this if it helps:
    http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html

  • Problem Querying Oracle Forms Using a Date Field and a Format Mask

    Hello,
    We are experiencing a problem with Oracle Forms that I was wondering if you can help me with.
    We have several Forms that have single database blocks assigned to Oracle tables. The Forms are queryable and one of the fields we’re querying on is assigned to a field on the base table which is Not Null and has a Type of DATE. We are storing date/time information in this field on the database table. The item on the form is set up as a Date field with a Maximum Length of 7, a Format Mask ‘MMDDYY’ and having a Query Length of 10.
    We’ve seen a discrepancy in how these fields are used to query the base table block. On some user’s computers they are able to enter a 6 digit date followed by the % sign (e.g. ‘091808%’) and they get the expected results. Other users get ‘FRM-40301: Query caused no records to be retrieved. Re-enter’. Do you know why we are experiencing this difference?
    - The Oracle Database version we are running is Release 10.1.0.5.0.
    - The Forms Developer version that we’re experiencing the problem with is 4.5.10.15.2
    Thanks,
    Kris

    There is no obvious reason that I can see.
    Version 4.5 is very old so you might have problems calling Oracle Support. If you can reproduce the same problem o0n 10.1.2 you should call have them analyze the problem.

  • Screen Date field and F4 calendar

    We are on v6.4.  I am trying to add a date field to a screen that is not defined in the dictionary.
    The field resides in an internal record of a db table as follows:
    mt_int_rec        LIKE zcrd_intrate,
    zcrd_intrate is defined as:
                         MANDT
                         RECTYP     
                         FICO_HIGH
                         FICO_LOW
                         TERM_HIGH
                         TERM_LOW
                         LTV_HIGH
                         LTV_LOW
                         EFF_DT_HIGH       Z_EFF_DATE_HIGH         DATS     8     DATUM
                         EFF_DT_LOW       Z_EFF_DATE_LOW         DATS     8     DATUM
         INT_RATE
         DATECR
         TIMECR
         USERCR
         DATECH
         TIMECH
         USERCH
    I'm adding mt_int_rec-EFF_DT_HIGH and mt_int_rec-EFF_DT_LOW to a sub-screen.
    When adding the 2 date fields to the sub-screen from the mt_int_rec, I can't seem to get the F4 ability to provide the standard calendar drop down.  I know I've done this before and the solution was pretty simple, but it's been over a year since I've had to maintain a screen in ABAP.
    Any suggestions would be appreciated.
    Paul

    Hi,
    In Attributes( Double Click on the Screen Field) Dict Tab select Format as DATE type
    and/Or do the following also
    Assign CACS_CALENDAR in the input field of Search Help attributes for this Screen Field
    Cheerz
    Ramchander Rao.K

Maybe you are looking for

  • Install problem on Windows 7 64-bit

    Hello all, I am attempting to install Adobe Reader on a new installation of Windows 7 64-bit.  When I run the setup file (AdbeRdr920_en_US.exe) the installer starts, but the progress bar never gets beyond 10.93%. It just hangs there.  The text above

  • Message has error status on outbound side

    Hi All. I'm doing file to file scenario.configured everything, showing success message in SXMB_MONI but with error flag at <b>outbound status</b> My R/3 system is :  SAP ERP Central Component 5.0 But I'm unable to find the related product for this sy

  • I need to append a string to another string

    I'm working with some inherited code, I'm a Colf Fusion novice myself, and I'm trying to make this order form display the correct data. The problem is a lot of data in the database is missing. Description in the QStockDB query can contain a lot of st

  • Server Error in '/' Application. - WEBPAGE WON'T OPEN??!

    when i'm connected to the internet, every website seems to work fine, except on one site, which up until this last week has always been fine. the page comes up with this: Server Error in '/' Application. Runtime Error Description: An application erro

  • NO NAME camera issue

    Camera: Panasonic Lumix DMC-TZ10 Problem: there seems no easy way to change the camera ID from NO NAME to something reasonable once plugged into MacPro. The older methods of: select device > Return > enter new name OR select device > Cmd+I > trundle