March 21st, 2003, 11:49 AM
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.
David M. Jones
March 22nd, 2003, 08:37 PM
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.