IIS ASP - Add new values to Access Double fields - x100

This is Interesting: Free IT Magazines  
Home > Archive > IIS ASP > August 2004 > Add new values to Access Double fields - x100





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Add new values to Access Double fields - x100
Mark

2004-08-27, 6:16 pm

Hi - I've got a really strange problem I can't explain - when I add new
values into my database (Access) ir multiplies them by 100 - for example
id I enter the values:

10.50
7.50
5.50

They go into the database as:

1050
750
550

The field in Access is a Double type, nullable, and set to default to 0.

My code to add it is:
(the response.writes are what product the numbered output above - so I
know what the form is posting, and subsequently what the database has in
its fields)

if Request("selected") <> "" then
response.write(Request("RetailPrice"))
response.write("<br>")
response.write(Request("Price"))
response.write("<br>")
response.write(Request("CostPrice"))
response.write("<br>")
ProductsRS.AddNew
ProductsRS("Product")=Request("Product")
ProductsRS("Description")= Request("Description")
ProductsRS("StockNumber")=Request("StockNumber")
ProductsRS("CategoryID")= Request("CategoryID")
ProductsRS("RetailPrice")=Request("RetailPrice")
ProductsRS("Price")=Request("Price")
ProductsRS("CostPrice")=Request("CostPrice")
ProductsRS.Update
ProductsRS.Requery
ProductID=ProductsRS("ProductID")
response.write(ProductsRS("RetailPrice"))
response.write("<br>")
response.write(ProductsRS("Price"))
response.write("<br>")
response.write(ProductsRS("CostPrice"))
response.write("<br>")

Can anyone please try and help me with this.

Kind regards, Mark

*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com