Solved

Problem Writing to SQL

Posted on 2006-11-17
4
120 Views
Last Modified: 2010-04-30
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
Comment
Question by:jayh99
4 Comments
 
LVL 1

Author Comment

by:jayh99
ID: 17965125
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
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 50 total points
ID: 17965130
>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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

758 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

17 Experts available now in Live!

Get 1:1 Help Now