Results 1 to 5 of 5
  1. #1
    godzilla3456 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2012
    Posts
    3

    $0.00

    Hi,



    In the access the value is $0.00 but when it is displayed on the web using .NET, then on the web page it is displaying as 0.0000

    Can anyone tell the solution for this problem...... Thanks in advance............

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    You need to explicitly format the value in .NET which assigns it to that page.

  3. #3
    godzilla3456 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2012
    Posts
    3
    It works for all the numbers except for 0.00

  4. #4
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Quote Originally Posted by godzilla3456 View Post
    It works for all the numbers except for 0.00
    What code works for all the numbers except for that? The thing to remember is that really you should be formatting at the last place you will be using it, not prior as formatting doesn't always propagate to the end. So, the key is to always format at the place where it will be viewed.

  5. #5
    godzilla3456 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2012
    Posts
    3
    In the MS access, we have the format option for each field. In that I have selected currency and in the decimal place I had given it value of 2, but it didnt make any difference.


    When being displayed on the website all other values are displaying correctly.
    If I have $10.00 in database it is displaying as 10
    If I have $44.00 in database it is displaying as 44

    but
    If I have $0.00 in database it is displaying as 0.0000

    only the $0.00 has the problem....


    This is the actual code:::


    dim ds as dataset = new dataset
    conn.open
    adapter.fill(ds, "productsA")
    conn.close


    This is code on the form::::
    <aspataGrid id="grdServerAL_hosting" runat="server" cssclass="text" AutoGenerateColumns="False" DataSource="<%# ds %>"
    ...

    <aspataGrid>

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums