9.745 * 100 gives an unexpected value

Hi All,
When I multily decimal values it give unexpected values.
9.145* 100 = 914.5 (OK)
9.245* 100 = 924.49999999999999999999999 (Unexpected ..should be 924.5)
9.345* 100 = 934.5 (OK)
9.445* 100 = 944.5 (OK)
9.745* 100 = 974.49999999999999999999999 (Unexpected ..should be 974.5)
Could some one please help me to resolve this ?
Actually i'm using this thing for rounding up for 2 decimal places.
Any suggetion for a good rounding for 2 decimal places alogorithm.
Rgds,
Thanx

import java.text.*;
NumberFormat nf = NumberFormat.getInstance();
nf.setMinimumFractionDigits(2);
nf.setMaximumFractionDigits(2);
System.out.println(nf.format(9.145* 100)) ;
System.out.println(nf.format(9.245* 100)) ;
System.out.println(nf.format(9.345* 100)) ;
System.out.println(nf.format(9.445* 100)) ;

Similar Messages

  • Auto renewable subscription verify receipt, unexpected value in expires_date field

    During renewable IAP subscription receipt verification I need to get the end date of the latest reciept.
    Apple has documented the receipt field "expires_date" field as giving the number of milliseconds since 1 jan 1970 but it actually contains the formatted date. Apple has warned not to use undocumented fields but there is an undocumented field called "expires_date_ms" that does give a millisecond value. So i have a choice to use the undocumented field that gives the documented expected value or the documented field that gives an unexpected value. It doesn't seem like either field will be reliable. What is the solution?
    Apples documentation on receipt fields:
    https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreRec eipt/Chapters/ReceiptFields.html#//apple…

    can you remove this from WSDL  <wsdl:definitions> tag.
    xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ebl="urn:ebay:apis:eBLBaseComponents" xmlns:cc="urn:ebay:apis:CoreComponentTypes"
    and add name="yourmessage interface" in <wsdl:definitions> tag.

  • WRITE command gives unexpected value when currency is JPY (japanse yen)

    Hi All
    I am getting unexpected value for below WRITE command but only when the currency is JPY (Japan Yen)
    lv_amount = 1215.40
    lv_currency = u2018JPYu2019.
    write   lv_amount   to   ev_amount_ext    left-justified    no-gap   NO-GROUPING   currency lv_currency.
    Value wrongly gets as ev_amount_ext = 121540 (Decimal takes as full value)
    Appreciate your help if you have any idea on this please
    Many Thanks
    Iver

    Hi,
      use like this
      lv_amount = '1215.40'
    lv_currency = u2018JPYu2019.
    write lv_amount to ev_amount_ext left-justified no-gap NO-GROUPING currency lv_currency.
    other wise.
    data lv_amounts  type string.
    move lv_amount to lv_amounts.
    lv_currency = u2018JPYu2019.
    write lv_amount to ev_amount_ext left-justified no-gap NO-GROUPING currency lv_currency.

  • How to give a default value in an inputText on a Form (Jdev 11G Preview2)

    First Test :
    In the .jspx I have a Form with an inputText :
    -id = inputText1
    -value=#{bindings.ppartId.inputValue}
    In the page Def (in the <methodAction ..for the submit button) I modified the NDValue in order to have
    <NamedData NDName="ppartId" NDType="java.lang.Integer"
    NDValue="${ParticipantInfo.participantId}"/>
    --> After clicking on the submit button I got a null value for the ppartId (in my model method) [In my ManagedBean ParticipantInfo, participantId is OK]
    Second Test
    In the .jspx I have a Form with an inputText :
    -id = inputText1
    -value=#{bindings.ppartId.inputValue}
    I replace the value
    -id = inputText1
    -value=#{ParticipantInfo.participantId}
    --> I saw the correct value when running the form but After clicking on the submit button I got a null value for the ppartId (in my model method)
    So my problem is : I just want to give a default value on an inputText on a form with a Managedbean. How to do that ?
    Could I modify the code of the action ofthe submit button to do that but how ?
    public String saisierapide_action() {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("SaisieRapide");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    return null;
    }

    Hi,
    if your attribute binding is bound to a variable, then you can achieve this by setting the DefaultValue attribute for the variable to the desired value. E.g.
      <variable Name="ppartIdVariable" Type="java.lang.String"
                DefaultValue="${ParticipantInfo.participantId}"/>
    <attributeValues id="ppartId" IterBinding="variables">
      <AttrNames>
        <Item Value="ppartIdVariable"/>
      </AttrNames>
    </attributeValues>HTH,
    Patrik

  • Execute SQL Task, OLE DB, Stored Procedure, Returns unexpected value upon second run

    when debugging SSIS, the "Execute SQL Task" runs a stored procedure and returns the expected value. When running the package a second time, the task returns an unexpected value. When running in VS2012 SQL editor, everything operates as expected.
    Please help me debug how to get the stored proc to return the same value every time the SSIS Package is run. thanks!
    Here is the sequence of events and what happens....
    Look for a Positor that matches the Application, Host, and User
    No matching PositorId is found, Creates new Positor row, returns that new PositorId
    Use PositorId to upload some data (Every thing works)
    re-run/debug the ssis pacakge
    Look for a Positor that matches the Application, Host, and User 
    <No clue what is happening>
    Returns -1 (SHOULD BE the same PositorId value returned in #2)
    "Execute SQL Task" Setup: No edits to Result Set nor Expressions
    "Execute SQL Task" Setup: GENERAL
    "Execute SQL Task" Setup: PARAMETER MAPPING
    SP called by "Execute SQL Task"
    CREATE PROCEDURE [posit].[Return_PositorId]
    AS
    BEGIN
    DECLARE @PositorId INT = [posit].[Get_PositorId]();
    IF (@PositorId IS NULL)
    BEGIN
    DECLARE @ProcedureDesc NVARCHAR(257) = OBJECT_SCHEMA_NAME(@@PROCID) + N'.' + OBJECT_NAME(@@PROCID);
    DECLARE @PositorNote NVARCHAR(348) = N'Automatically created by: ' + @ProcedureDesc;
    EXECUTE @PositorId = [posit].[Insert_Positor] @PositorNote;
    END;
    RETURN @PositorId;
    END;
    Supporting SQL Objects:
    CREATE FUNCTION [posit].[Get_PositorId]
    RETURNS INT
    AS
    BEGIN
    DECLARE @PositorId INT = NULL;
    SELECT TOP 1
    @PositorId = [p].[PO_PositorId]
    FROM [posit].[PO_Positor] [p]
    WHERE [p].[PO_PositorApp] = APP_NAME()
    AND [p].[PO_PositorHost] = HOST_NAME()
    AND [p].[PO_PositorUID] = SUSER_ID();
    RETURN @PositorId;
    END;
    GO
    CREATE PROCEDURE [posit].[Insert_Positor]
    @PositorNote NVARCHAR(348) = NULL
    AS
    BEGIN
    DECLARE @ProcedureDesc NVARCHAR(257) = OBJECT_SCHEMA_NAME(@@PROCID) + N'.' + OBJECT_NAME(@@PROCID);
    SET @PositorNote = COALESCE(@PositorNote, N'Automatically created by: ' + @ProcedureDesc);
    DECLARE @Id TABLE
    [Id] INT NOT NULL
    INSERT INTO [posit].[PO_Positor]([PO_PositorNote])
    OUTPUT [INSERTED].[PO_PositorId]
    INTO @Id([Id])
    VALUES(@PositorNote);
    RETURN (SELECT TOP 1 [Id] FROM @Id);
    END;
    GO
    CREATE TABLE [posit].[PO_Positor]
    [PO_PositorId] INT NOT NULL IDENTITY(0, 1),
    [PO_PositorApp] NVARCHAR(128) NOT NULL CONSTRAINT [DF__PO_Positor_PO_PositorApp] DEFAULT(APP_NAME()),
    CONSTRAINT [CL__PO_Positor_PO_PositorApp] CHECK([PO_PositorApp] <> ''),
    [PO_PositorName] NVARCHAR(256) NOT NULL CONSTRAINT [DF__PO_Positor_PO_PositorName] DEFAULT(SUSER_SNAME()),
    CONSTRAINT [CL__PO_Positor_PO_PositorName] CHECK([PO_PositorName] <> ''),
    [PO_PositorHost] NVARCHAR(128) NOT NULL CONSTRAINT [DF__PO_Positor_PO_PositorHost] DEFAULT(HOST_NAME()),
    CONSTRAINT [CL__PO_Positor_PO_PositorHost] CHECK([PO_PositorHost] <> ''),
    [PO_PositorSID] VARBINARY(85) NOT NULL CONSTRAINT [DF__PO_Positor_PO_PositorSID] DEFAULT(SUSER_SID()),
    [PO_PositorUID] INT NOT NULL CONSTRAINT [DF__PO_Positor_PO_PositorUID] DEFAULT(SUSER_ID()),
    [PO_PositorNote] VARCHAR(348) NULL CONSTRAINT [CL__PO_Positor_PO_PositorNote] CHECK([PO_PositorNote] <> ''),
    [PO_tsInserted] DATETIMEOFFSET(7) NOT NULL CONSTRAINT [DF__PO_Positor_PO_tsInserted] DEFAULT(SYSDATETIMEOFFSET()),
    [PO_RowGuid] UNIQUEIDENTIFIER NOT NULL CONSTRAINT [DF__PO_Positor_PO_RowGuid] DEFAULT(NEWSEQUENTIALID()) ROWGUIDCOL,
    CONSTRAINT [UX__PO_Positor_PO_RowGuid] UNIQUE NONCLUSTERED([PO_RowGuid]),
    CONSTRAINT [UK__Positor] UNIQUE CLUSTERED ([PO_PositorApp] ASC, [PO_PositorHost] ASC, [PO_PositorUID] ASC),
    CONSTRAINT [PK__Positor] PRIMARY KEY ([PO_PositorId] ASC)
    GO
    ssd

    The error is in item 7: Returns -1 (SHOULD BE the same PositorId value returned in #2); but no error message is returned or thrown from SSIS.
    The error message indicated referential integrity is not upheld when inserting records. This error message occurs AFTER the Execute SQL Task successfully completes; the E.SQL Task returns -1.  The executed SQL code will not allow values less than 0
    ([PO_PositorId] INT NOT NULL IDENTITY(0, 1),)
    [Platts Valid [41]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E2F.
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80040E2F  Description: "The statement has been terminated.".
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80040E2F  Description:
    "The INSERT statement conflicted with the FOREIGN KEY constraint "FK__PricingPlatts_Posit_PositorId". The conflict occurred in database "Pricing", table "posit.PO_Positor", column 'PO_PositorId'.".
    The aforementioned FOREIGN KEY constraint is due to the value being returned by the Execute SQL Task.; therefore, the error lies in the value returned by the Execute SQL Task.

  • Function module that can give the last value or the highest value of a key

    hi,
    Is there any function module that can give the last value or the highest value of a key feild in a z table.
    regards,
    johnson

    Hi ,
    We have  aggregate functions in SQL. Some of the functions are as follows.
    MAX(col ) Determines the maximum value of the value in the column col in the resulting set or in the current group.
    MIN( col ) Determines the minimum value of the content of the column col in the resulting set or in the current group.
    AVG(  col ) Determines the average value of the content of the column col in the resulting set or in the current group. The data type of the column has to be numerical.
    SUM( col ) Determines the sum of the content of the column col in the resulting set or in the current group. The data type of the column has to be numerical.
    COUNT( col ) Determines the number of different values in the column col in the resulting set or in the current group.
    For further details , type the function name name and press F1 for further help.
    Eg: select count(mantr) from mara into workarea where condition.
    Reward points if helpful.
    Thanks and Regards.

  • I have € 0.09 in my account and I can not buy anything with this value. I want to undo (give up) this value. What do I do?

    I have € 0.09 in my account and I can not buy anything with this value. I want to undo (give up) this value. What do I do?

    Click here and request assistance.
    (68968)

  • Unexpected value matrix(1,0,0,1,NaN,NaN) parsing transform attribute Anychart

    We are running Oracle Apex 4.2 and whenever a user creates a new session,  the chart on the home page shows the No Data Found Message. However, when you refresh or submit the page, the correct data and rendering appears. On the initial page load, the only message in the Javascript Console is a warning "Unexpected value matrix(1,0,0,1,NaN,NaN) parsing transform".
    We attempted an on load refresh dynamic action but that does not work as well.
    What could this be?
    Thanks.

    The error:
    gethydrosdi.xsl<Line 22, Column 40>:
    XML-0137: (Error) Attribute 'select' used but not declared.is caused by trying to parse your XSLT stylesheet using an XML parser which has been set to use DTD validation.
    The follow example illustrates a program that causes your error to appear. Given the file 'foo.dtd':
    <!ELEMENT foo EMPTY>and the file 'foo.xml':
    <?xml version="1.0"?>
    <!DOCTYPE foo SYSTEM "foo.dtd">
    <foo/>and the stylesheet 'foo.xsl':
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>The following Java program illustrates producing your error:
    import oracle.xml.parser.v2.*;
    import java.io.*;
    import org.w3c.dom.*;
    public class ex {
    public static void main(String[] a) throws Throwable {
    DOMParser d = new DOMParser();
    d.setValidationMode(true);
    d.parseDTD(new FileReader("foo.dtd"),"foo");
    d.setDoctype(d.getDoctype());
    d.parse(new FileReader("foo.xml"));
    d.parse(new FileReader("foo.xsl"));
    XMLDocument doc = (XMLDocument)d.getDocument();
    doc.print(System.out);
    }If you run this with the command:
    java exfrom the directory where foo.xml, foo.dtd, and foo.xsl are, you'll get the error:
    Element 'xsl:stylesheet' used but not declared.The following code illustrates the way to avoid the error, by setting validation mode to false before trying to parse the stylesheet:
    import oracle.xml.parser.v2.*;
    import java.io.*;
    import org.w3c.dom.*;
    public class ex {
    public static void main(String[] a) throws Throwable {
    DOMParser d = new DOMParser();
    d.setValidationMode(true);
    d.parseDTD(new FileReader("foo.dtd"),"foo");
    d.setDoctype(d.getDoctype());
    d.parse(new FileReader("foo.xml"));
    // Set the validation mode to false before using
    // the same instance of a DOMParser to parse the stylesheet.
    d.setValidationMode(false);
    d.parse(new FileReader("foo.xsl"));
    XMLDocument doc = (XMLDocument)d.getDocument();
    doc.print(System.out);
    }null

  • Unexpected value type for Item Tag Name ; expected System.Single, received

    Hi,
    I am using PCo 2.1 with MII 12.1 to extract values from some PI tags. When I run the query, I get this error -
    Unexpected value type for Item <Tag Name>; expected System.Single, received System.String[Value = Scan Off]
    Can somebody explain what I need to do to get the correct result?
    Regards,
    Chanti.

    To make the service return "whatever is passed", you have to take a step back and realize that there is a little understanding of XML Schema required.
    When using a complexType, which is defined as a sequence, then you are implying an ordered sequence of elements. Default value for the 'minOccurs' attribute is 1. It's also important to understand that there is a difference between minOccurs=0 and nillable="true".
    nillable="true" just means that the name element can carry a null value. If you want the name element to be optional, then you must use the minOccurs=0 and keep the maxOccurs to it's default value of 1. Using an array is just a bad work around. This is for deserialization (XML to JAVA).
    The second part of you problem is on the serialization (or JAVA to XML). When you have a JAVA Bean, there is no way to make the difference between a member's value being null or not set, so it's impossible to decide if you need to send back a nul (xsi:nil="true"), an empty element <ns1:name/> or nothing.
    That said, if you do want to go the XML route, you can use the dataBinding="false" flag in the different WSA command. Instead of converting XML into JAVA, you will have SOAPElement parameters, where you can do all you want (see WS user's guide [1] for details - chapter 16). Note that you have to make sure that the WSDL (your contract) reflect what you are doing on the wire (format of your messages), so that you do not geopardize your interoperability with other toolkit.
    Note that this only applies to literal message formats (use attribute in WSDL), which is your case.
    Hope this helps,
    Eric
    [1] http://download-west.oracle.com/otn_hosted_doc/ias/preview/web.1013/b14434.pdf

  • Zero phase filter returns unexpected values

    Hi,
    I want to filter the signal using the zero phase filter.
    This is my code using the filter:
    The filter returns some values like this:
    In this diagram, the green curve is the signal, which has been filtered using the zero phase filter.
    Is there a better example or special advices for these unexpected values? What I want is the signal without phase-dirft.
    Wilbur

    Hi,
    it was a good idea to post that snippet - but it would be best if we had your data too.
    Could save your inputs as default data and post the vi (don't know if snippets retain default values)?
    Regards
    Florian

  • Wo ist der Fehler? : Unexpected Value in einem Switch-Script

    Hallo!
    (ich benutze Adobe Acrobat 11 prof mit Windows 7 prof. -Umgebung) 
    Ich "arbeite" seit Januar 2014 mit Acrobat 11 prof. Kein Informatiker, reiner Anwender...
    Ich möchte in einem "Ernährungs-PDF-Bilderbuch" Wissen abfragen. Mit einem Script, das in einem anderen Formular bereits funktionierte, hänge ich jetzt und komme nicht weiter.
    Jede Seite hat 4 Optionsfelder und 1 Textfeld. Bsp: die Gruppe: "Blumenkohl" mit - verschiedenen Kohlehydratmengen (0-3 KE als Optionsfeldauswahl).
    Das Script steht in dem zugehörigen Textfeld ("Blumenkohl-KH") in einem benutzerdefinierten Berechnungsscript.
    Format: "Keine":
    Das Script lautet:
    var cSelection = this.getField("Blumenkohl").value;
    switch (cSelection)
       case "0":
         event.value = "Richtig! Blumenkohl hat 0 KE ";
         break;
       case "1":
         event.value = " 1 KE ist falsch! Blumenkohl hat 0 KE ";
         break;
       case "2":
         event.value = "2  KE ist falsch! Blumenkohl hat 0 KE ";
         break;
       case "3":
         event.value = "3 KE ist falsch! Blumenkohl hat 0 KE ";
         break;
       case "Off":
         event.value = "Keine Antwort: Fehler! Blumenkohl hat 0 KE ";
         break;
       default:
         // This option should never be called since
         // all possible cased are handled
         event.value = "Unexpected Value: " + cSelection;
         break;
    Nach dem Reset erhalte ich erwartungsgemäß die Auswertung: Keine Antwort: Fehler! Blumenkohl hat 0 KE!
    Ich kann alle Optionsfelder anklicken, aber ich erhalte in dem Textfeld immer die Auswertung. "Unexpected Value: " mit dem zugehörigen "cSelection"-Wert.
    zuvor kamen Fehlermeldungen, wie:
    ReferenceError: SetFieldValues is not defined
    SetFieldValues is not defined
    nachdem ich ein Leerzeichen zwischen switch und (cSelection) eingefügt habe, kommen jetzt gar keine Fehlermeldungen mehr. Dennoch bleibt die Fehlausgabe "Unexpected Value: ...", ohne dass ich den Grund für das Nichtfunktionieren erkennen kann.
    Danke für die Rückmeldungen.
    chris.sberg

    Danke für die Antwort - aber es funktioniert auch dann nicht.
    Es sieht dann so aus:
    //-----------------Bearbeiten Sie nicht die XML-Tags--------------------
    //<AcroForm>
    //<ACRO_source>Blumenkohl-KH:Calculate</ACRO_source>
    //<ACRO_script>
    /*********** gehört zu: AcroForm:Blumenkohl-KH:Calculate ***********/
    var cSelection = this.getField("Blumenkohl").value;
    switch (cSelection)
       case "0":
         event.value = "Richtig! Blumenkohl hat 0 KE ";
         break;
       case "1":
         event.value = " 1 KE ist falsch! Blumenkohl hat 0 KE ";
         break;
       case "2":
         event.value = "2  KE ist falsch! Blumenkohl hat 0 KE ";
         break;
       case "3":
         event.value = "3 KE ist falsch! Blumenkohl hat 0 KE ";
         break;
       case "Off":
         event.value = "Keine Antwort: Fehler! Blumenkohl hat 0 KE ";
         break;
    //</ACRO_script>
    //</AcroForm>
    Es bleibt jetzt an der letzten Antwort hängen: "Keine Antwort: Fehler! Blumenkohl hat 0 KE" -
    Wenn ich auch die Zeilen von case "off" entferne, also nur case "0" bis "3" stehen lasse, dann erscheint gar kein Text mehr.
    Habe ich vielleicht bei der Formatierung des Textfeldes einen Bug?
    Danke für die Tips!
    chris.sberg

  • @@TRANCOUNT gives unexpected value

    -- When I run this SQL, the value of @@TRANCOUNT = 0 both before and after
    -- the insert statement. So, why does the value of 2 get written to the
    -- table? I would expect a 1 to be written to the table, not 2.
    SET
    IMPLICIT_TRANSACTIONS
    OFF
    CREATE
    TABLE #temp
    (col1
    int
    BEGIN
    TRAN
    ROLLBACK
    TRAN
    SELECT @@TRANCOUNT
    -- @@TRANCOUNT is zero at this point
    INSERT
    INTO #temp
    VALUES
    (@@TRANCOUNT);
    SELECT
    @@TRANCOUNT
    -- @@TRANCOUNT is zero at this point
    SELECT
    FROM#temp
    -- Why was 2 written to the table rather than 0?
    DROP
    TABLE #temp
    Emorej

    This is the expected behavior; why are you thinking that the counts should be different?  perhaps the TRAN after the BEGIN statement ( a BEGIN TRAN statement )  is a source of confusion to you?  That TRAN is closed by the ROLLBACK TRAN statement. 
    After the ROLLBACK TRAN the expected @@TRANCOUNT should be zero.
    EDIT:
    The results are similar with a permanent table:
    SET
    IMPLICIT_TRANSACTIONS OFF
    CREATE
    TABLE temp (col1 int
    BEGIN
    TRAN
    ROLLBACK TRAN
    SELECT @@TRANCOUNT [@@trancount]
    -- @@TRANCOUNT is zero at this point
    INSERT INTO temp VALUES (@@TRANCOUNT);
    SELECT @@TRANCOUNT [@@trancount]
    -- @@TRANCOUNT is zero at this point
    SELECT * FROM temp
    -- Why was 2 written to the table rather than 0?
    DROP TABLE temp
    /* -------- Output: --------
    @@trancount
    0
    (1 row(s) affected)
    (1 row(s) affected)
    @@trancount
    0
    (1 row(s) affected)
    col1
    2
    (1 row(s) affected)
    The OP wants to know why 2 is inserted into #temp and not 0Jeff Wharton
    MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt) MCT, MCPD, MCITP, MCDBA
    Blog: Mr. Wharty's Ramblings
    Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker

  • How to give not null value in a rule for a field

    hi,
    i want to create a rule through rule designer where i want a field say "country" should not be left blank. when i go to the rule designer and select country through attribute value i get 2 conditions "=" and "!=" what shoud i give the value as so that the country field is not null.
    TIA

    I don't think you can have null value in the rule designer , rather you can created one more UDF and populate this UDF with something based on the nulllness/not-null of the country field and use this new UDF in the rule .
    Hope this helps .
    Thanks
    Suren

  • BEX Query : unexpected values in tab rows.

    Hi experts,
    I work on BW 3.5, and have the following problem :
    I have a web template with 2 tabs givings some result numbers. It works quite well on the validation environment.
    I load it in production environment, and the following happens :
    some results are incorrectly displayed. For instance, a ratio is displayed '125,12' (%), but when I ask for 'ratio definition' (right clic on the mouse), it gives me the right value (10,2 %).
    How can it be ?
    Is it a referenced SAP bug ?
    Can it be arranged ?
    much thanks to all contributors.
    Fred

    The problem came from the buffured queries result.
    The following solved the problem :
    - transaction RSRT->cache memory monitor->suppress
    - I had then to edit the problematic queries with Query Designer and just save them again.
    After that, every thing seams ok.
    I understand for RSRT, but I have no idea why I had to save queries again.
    Any idea ?
    Much thanks anyhow.
    Fred

  • MD5 implementation gives different hash values from java1.2 to java 1.3

    Hi,
    I have MD5 implementation using Java api. When i run the program using Java 1.2, I get one version of hash value. When i run the same program using Java 1.3/1.4 I get a different version of hash value.
    the hash value generated by java1.2 authecticates correctly with server but the one generated by 1.3/1.4 gives me authetication failure with the server.
    I serious doubt some encoding issue with md5 implementation from java 1.2 to java 1.3/1.4. I would like to know what is the root cause for getting a different hash with java 1.3/1.4
    Thanks
    sunil

    Here is the code, I am converting the string to bytes and then passing it to md.
    public static String getMD(String strInput) {
    /*---- Local Variable Declares ----*/
    String rStr = new String();
    try {
    MessageDigest md = MessageDigest.getInstance("MD5");
    md.update(strInput.getBytes("UTF-8"));
    byte[] challengeResponse = md.digest();
    System.out.println("Len of BYTE ary in JAVA:" + challengeResponse.length);
    rStr = new String(challengeResponse);
    } catch(Exception e) {
    System.out.println("\n\nException while calling getMD\n\n");
    e.printStackTrace();
    } /* end of try catch block */
    return rStr;
    When I run the code using java 1.2, I got the following is octal dump output
    "0000000 037677 135543 076565 063432 136210 040616 004766 177265"
    When I run the code using java 1.3/1.4, I go the following octal dump outpu
    "0000000 037477 037543 076565 063432 037477 040477 004477 037477"

Maybe you are looking for