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

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 129
  • Last Modified:

Problem Writing to SQL

I am having difficulties writing to a SQL database.  The field I am having problems with is a decimal format.  With a length of 5 characters, a precision of 9 and a scale of 6.  I'm not exactly sure what all of those mean (I didn't create the database), but the error message that I am getting is as follows:  

"Multiple-step OLE DB operation generated errors.  Check each OLE DB status value, if available.  No work was done."

If I change the data type to varchar in the database, the program runs through fine.

The # it is trying to enter to the database is: 3801.5784

Thanks in advance for the help.
0
jayh99
Asked:
jayh99
1 Solution
 
jayh99Author Commented:
Nevermind, I found that the format I was receiving in wasn't what the database was looking for.  The number needed to be divided by 100.  Thanks.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>a precision of 9 and a scale of 6.
means you have maximum 3 digits before the comma and 6 after. hence 3801 is too big.

change the precision to at least 10 (better 18), and keep the scale of 6.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now