Add new values to Access Double fields - x100
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > IIS server support > IIS ASP > Add new values to Access Double fields - x100




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Add new values to Access Double fields - x100  
Mark


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-27-04 11: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!





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:43 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register