Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Inserting currency into a database...

Posted on 2004-10-21
2
Medium Priority
?
277 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
Comment
Question by:brucegust
2 Comments
 
LVL 8

Expert Comment

by:sigmacon
ID: 12375907
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:
Mikal613 earned 1000 total points
ID: 12377035
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is about my first experience with programming Arduino.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
Progress
Starting up a Project

916 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