Click here to Skip to main content
15,892,674 members
Articles / Database Development / SQL Server

Input string was not in a correct format.

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
14 Feb 2013CPOL 0  
Instead of Convert (bad word, in this case!), use Decimal.TryParse or Decimal.Parse. It won't improve your code much, but TryParse will help you to avoid exception (but there is nothing wrong with exceptions). More importantly, you will understand better what you are doing. You are parsing, not...

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
United States United States
Physics, physical and quantum optics, mathematics, computer science, control systems for manufacturing, diagnostics, testing, and research, theory of music, musical instruments… Contact me: https://www.SAKryukov.org

Comments and Discussions