1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Rep Power

    Question ASP, Access XP, and Decimal Places...

    Alright, I am opening an Access XP database via ASP. One of the fields is a numerical field, and I would like to force it to display the number + 1 digit to the right of the decimal. For some reason it is only displaying digits to the left.

    In Design View, my Access Table (names 'arlist') looks like this:
    Field Name: level, Data Type: Number, Field Size: Integer, Format: Fixed, Deciaml Places: 1

    My SQL Statement: SELECT * FROM arlist;

    Then the VBScript I'm using to access the table looks like this:
    Response.Write"<TD align=""right"" bgcolor=""" & strBG & """ width=""10%""><P class=""body"">" & rsDC.Fields("level") & "</TD>" & vbCRLF

    I am opening the table via ADO Statically with a Read-Only pointer because the page just displays the contents of the table. I've tried everything I can think of to preserve the decimal place. If I view the table in Access, the decimal places are correct.

    Please Help,
    David M. Jones
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Canada - Egypt
    Rep Power

    Wrong Field Size

    You have The Field Size is set Integer. This does not allow for decimal points. Although it lets you set it!!!!!!

    Change it to Double or Decimal.

    Also check the Help for access under the "FieldSize Property" topic. It has all the specs for the Field types and there capabilities.

    This is based on my experience with Access 2000 not XP. I am not sure if there are differences.

    I hope this information was helpful.
    I hope this is of any help to anyone.


IMN logo majestic logo threadwatch logo seochat tools logo