Solved

Inserting currency into a database...

Posted on 2004-10-21
210 Views
Last Modified: 2010-04-17
When inserting a record that is formatted as currency, do you need to handle it in a similar fashion as you do a date as far as surrounding it with a special character (date would be '#" & Request.Form("Date") &"#')?

Thanks!
0
Question by:brucegust
    2 Comments
     
    LVL 8

    Expert Comment

    by:sigmacon
    Currency values usually get inserted as decimal values. Make sure that your request field only contains digits (a valid decimal number). You then don't need any special characters around it. If you do not make sure that your form field has a valid number in it and you do not use quotes, your insert may fail depending on what the user entered. With quotes around it it will still fail if the user's input cannot be parsed into a decimal. Form field validation is key before it goes into the DB.
    0
     
    LVL 48

    Accepted Solution

    by:
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    Title # Comments Views Activity
    static class 3 36
    commonTwo  challenge 63 44
    array220 challenge 8 9
    nestparen challenge 4 13
    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    860 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now