Add new values to Access Double fields - x100

Discussion in 'ASP General' started by Mark, Aug 26, 2004.

  1. Mark

    Mark Guest

    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.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Mark, Aug 26, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sydex
    Replies:
    12
    Views:
    6,508
    Victor Bazarov
    Feb 17, 2005
  2. Replies:
    5
    Views:
    434
    James Kanze
    Jun 27, 2008
  3. NH

    allow user to add new fields

    NH, Sep 30, 2008, in forum: ASP .Net
    Replies:
    0
    Views:
    348
  4. Cyril.Liu
    Replies:
    0
    Views:
    455
    Cyril.Liu
    Dec 2, 2008
  5. Replies:
    23
    Views:
    524
    Tim Streater
    Dec 18, 2013
Loading...

Share This Page