Decimal problem of precision number when filling a dataset arithmetic overflow

I typed this question here but no resolution yet:
[http://stackoverflow.com/questions/1043626/odp-net-oracle-decimal-number-precision-problem-when-filling-a-dataset-exception]

I think it has to do with the OracleDecimal automatically converted into a System.Decimal which has a lower procession, this should be done automatically by the fill method of the data adapter.


I'll enter again the question here:

I work in c# .net 2 (Visual Studio 2005 SP1) try to fill a dataset with the results of a select * from table from Oracle10g database. The .net framework, IDE and database cannot be changed on the customer site.

I connect using the provider dll 2.102.2.20 version ODP.net, also now tried with 2.111.6.20 (11g)

When I run the fill command I get an Exception:

Arithmetic operation resulted in an overflow

Also, if I try to display the column incriminated in the Visual Studio designer (see Data Table) I get * < cannot read data > * for each row of this column in the table. The code works perfectly if my query selects the other columns with integers, for example by omitting this column.

The column in question looks good when I see it in the database of Toad, data looks like:

* 919.742866695572*

I need accuracy because it took for a monte carlo simulation.

If instead to use a data adapter to fill the datatable, I use a datareader and call dataReader.getValue (columnIndex) I get the same error, but if I call dataReader.GetOracleDecimal (columnIndex) then I get the result I'm looking for, no error.

I prefer to use data adapter and filling a dataset (note, these are data sets not typed as I couldn't not generated automatically strongly typed datasets to work from an oracle database). I don't want to use datareader and walk through the results (choose the column values), as I'm writing this as a generic method for working in many scenarios, regardless of the number of columns, indexes of decimal columns that would require specific calls by data type.

Can anyone help?

Thank you

Published by: user11301111 on June 25, 2009 08:47

SafeTypeMapping would probably help here if you don't mind the data to be converted to a string.

If you don't want to use SafeTypeMapping, do you actually the precision that you have the data set number type as? Maybe you could redefine the data type with less precision?

It will be useful, corrections and comments welcome.
Greg

Tags: Database

Similar Questions

  • Number of decimal places of precision for numeric fields Standard

    Is there a number of decimal places of precision integrated in PLM4P for standard, off-screen digital box? This level of precision is editable for the system, or on a case-by-case?

    Thank you

    Zach

    We don't currently support it. The default precision is 5 digits.

  • I have a request for a phone number in my HTML code in my database which is automatically filled with the correct sales phone number when sending emails. I create HTML code in dreamweaver and then put the code in my e-mail program. I need to do the ph

    I have a request for a phone number in my HTML code in my database which is automatically filled with the correct sales phone number when sending emails. I create HTML code in dreamweaver and then put the code in my e-mail program. I need to make the phone number in the clickable query. I know the code to do it well not in a query. What is the code?

    As far as I saw, most of the smartphones will automatically recognize it these days, as long as the number is written in a format of regular phone number. This format also allows to make images or text other than a telephone number in a tap to call the link.

    Looking at what you have presented I guess it would be something along the lines of...

    urmcell>>">urmcell >

    When the location of the link and the link text would be the same variable.

    I've never worked with Intelliclick so above is a wild guess. They would be those who need to ask themselves if there is a way to fill in the address of a link like that.

  • How can I remove a name from a fax machine company, he appears near the fax number when received.

    When I send a fax the company name appears next to the above fax number when it is received. How can I remove that?

    I see you have a problem down the fax header the page or change.

    What kind of printer you have?

    Go to your settings on your printer. Go to fax settings. There should be option header of FAX under this menu.

    '"Click the WHITE STAR if you want to say thank YOU" '

    I hope this helps.

  • Problem of precision in Illustrator (17.1.0)

    Hello

    I have a big problem of precision in Illustrator CC (17.1.0).
    Impossible to match exactly 2 points together. I tried almost all methods: manual, bearings commented, tool alignment and coordinated.

    Points do not want to align precisely and when a point will align with one another, another point of the illustration jump.

    Impossible to work precisely and in projects like the logos it is very annoying.

    Capture d’écran 2014-05-16 à 14.42.22.pngCapture d’écran 2014-05-16 à 14.42.53.pngCapture d’écran 2014-05-16 à 14.42.00.png

    Damien,

    I think that you are haunted by the ghost of Pixel Align attribute.

    Select paths and in the Transform palette uncheck snap to grid of pixels and see if it works.

    If so, uncheck also align new objects to the pixel grid in the options of the Launcher.

    You can avoid the types of documents with the default (RGB for the web and other) or change the default value for such documents.

  • my iPhone 6s has problems with the GPS when I use some applications, it does not work well and give especially the bad road. Can someone help me?

    my iPhone 6s has problems with the GPS when I use some applications, it does not work well and give especially the bad road. Can someone help me?

    My iphone 6 has started having the same problem. Its literally the GPS. Saying that it does not find me at all. Ive seen say location for more than an hour in the suburbs of chicago. It started to happen to me after I downloaded the latest update for the iphone. I hope they react and let you know what is happening because I'm dying to know as well.

  • ProcessGPORegistryPolicy: Detected the error 87 when filling registry with settings in the file to archive temporary.

    I'm seeign as below errors in gpsvc.log and gpupdate/force fails with the error below.

    "Processing of Group Policy failed because of internal system error".

    RSOP appears in the confiuration computer, registry error, Unspecified.

    ProcessGPORegistryPolicy: Detected the error 87 when filling registry with settings in the file to archive temporary.

    SetRegistryValue: Could not open the key < software\policies\microsoft\windows\windowsupdate\au=""> 87

    Could you please help in investigating it?

    Concerning

    Murali

    Hello

    I suggest you to send your request in the TechNet forums.

    http://social.technet.Microsoft.com/forums/en/category/w7itpro

    http://social.technet.Microsoft.com/forums/en/categories

  • WMP 11 refuse (skips) some of my music when filling out my library.

    WMP 11 refuse (skips) Some of My Music when filling out my library.  The files are MP3.  XP PRO SP/3

    THANX roleplayer

    You can try to reset media library of WMP, following the instructions for WMP 11 on XP at http://zachd.com/pss/pss.html#medialibrary . Note the reset of the library will make you lose all the counts to play and possibly ratings too. Tim Baets
    http://www.BM-productions.TK

  • Problems with the cursor when you type

    I don't know if it's something in Vista, but I have terrible problems in Word and when typing emails. I can touch type and normal type without looking at the screen. However, I find when I look at the screen, the cursor inexplicably himself stuck about4-6 rear lines and hit the last piece in the middle of the existing text. In fact it just happened again - when I type ing he climbed to the title: why!

    I feel responsible because I don't get it in the older microsoft software that I use at work and it has never done in internet cafes - didn't have it a few months, but it drives me crazy: why it does this?

    Patjom, make sure that you do not have to hide when you type the value of the mouse pointer. Here are the steps:

    Open mouse by clicking the Start button, click Control Panel, clicking hardware, and then clicking on the mouse.
    Click the Pointer Options tab, and then do one of the following:
    Uncheck the Hide pointer while typing Rami
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Error: "" Windows Media Player has encountered a problem reading the file' when try to play a music video.

    Original title: "Windows has encountered a problem during playback of the message to the file.

    No one knows why, I received this message trying to read a music clip of Mediabase on my computer which already includes Windows Media Player 11 as part of the Windows Live package?

    My HP desktop computer is only 8 months old and is running IE8 and Vista.

    Thank you!

    Hey Marv,

    What is the file format of the video music?

    You can follow the steps in this link & check if the problem persists:

    Error when you try to play multimedia files: Windows Media Player has encountered a problem while playing the file. For any additional help, click Help on the Web

    Note: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    Hope the helps of information.

  • The problem starts just today when I opened my computer and started playing with the no sound

    So, basically, as the title says, my video games sounds is not recognized by my volume mixer. The problem started only today when I opened my computer and started to play with no sound. At first I thought that I had cut all the sounds but then I checked and nothing was cut and I also checked that my volume mixer didn't even have the game volume control bar to increase or decrease the sound of the video game. I also checked my device to update manager, but didn't so I get really worried about it, if you could help me that would be great.

    (PS: If you need information about my computer just ask in the comments and I'll tell you what you need to know.)

    Well, thanks for the time spent by only typing the answer, I really appreciate it, but I already solved... Just had to uninstall my audio driver from Device Manager and reinstall it. But now I have another problem, when I try to open any folder I gives me an error like this: "this file doesn't have any associated program that allows you to perform this action. "Install a program or if you have one, create an association in the-> default programs control panel. I also noticed that when I right click on it, it should say 'Open', but instead he said: "cmd" as the priority order.

    (PS: I know this issue is off-topic but see if you can help me with this one please.)

    PIC:

  • Problem does not occur when it is not connected USB so that it looks like some sort of communication problem. The L355 worked perfectly.

    Hello

    I recently installed an Epson L555 instead of my Epson L355, which worked well with my software windows 7 and my BACK program based. However, whenever the L555 turned the printer just keeps ejecting the hopper pages until it is empty. On the menu screen, it says "printing", but there is nothing in the print queue and I didn't send anything to be printed. Sometimes it reads "Fax set auto answer. By pressing the Stop/Reset button stops the ejection pages and "Cancel" is displayed on the screen. This continues for about 2-3 minutes, then the pages start ejected again. Problem does not occur when it is not connected USB so that it looks like some sort of communication problem. The L355 worked perfectly.

    Hello

    Thanks for posting your query in the Microsoft community.

    I understand that print jobs are getting cancelled and I will be happy to answer your query. There could be several reasons for this cause and to diagnose the problem, initially, I ask you to refer to the suggestions in the article below and check.

    Solve printer problems

    Hope this information is useful. Please feel free to answer in the case where you are facing in the future other problems with Windows.

  • If I get the dvd of recovery to win s 7 of the manufacturer, what problems is I meet when I try to boot from a usb dvd player

    Separated from this thread.

    OK here is what I was asking.  If I get the dvd of recovery to win s 7 of the manufacturer, what problems I will get when I try to boot from a usb dvd player.  I worry because my computer is uefi firmware. should I disable secure boot, make sure the dvd usb drive first in the boot order.  What other bios setting I would be worried.

    You will get a facility better if you find the ISO to create such media as discussed in step 1 of the clean reinstall Windows 7 follow these steps to get the best possible installation.  You can even create flash media if that's easier for you.

    Regard to Recov disks that reinstall all the bloatware factory, Yes, you must disable Secure Boot in firmware that doesn't support UEFI to install Windows 7, and then start the media as a UEFI device.

    After installation, you can pick up some performance and optimize the installation by following Clean Up Factory Bloatware .

    You can also do a Clean install Windows 10 improvement using the Windows 7 product key, as this is explained in this link.   You can at any time change to Windows 7, even move back and forth until only is installed at the same time.

    Let us know if there are any questions and how it goes.

  • BlackBerry Smartphones caller ID number when I receive a call?

    I don't know what happened, but all of a sudden when I get an incoming call, the caller ID is not displayed, so I have no idea who is the call until I answer the phone. I turned the phone off and on again, tried to take the battery, etc, but nothing worked. How can I fix? Thank you!

    Just to check, you call people in your address book? Even if they are not it does not show the whole number of the incoming call? Also these numbers before that date have been arrested? Make sure that they are not blocking their number when they call you.

    Check the following settings:

    • Options | Security options | General settings. Make sure that the content Protection is disabled
    • Go to your phone call log /, click on the menu button, click Options. Then, go to the General Options. See if the identity of my limit is set to fixed network.
    • Go to your phone call log /, click on the menu button, click Options. Go to smart dial. Make sure your country code and national number length are set correctly
  • I have a problem with my HDD to fill without no reason.

    I have a problem with my HDD to fill without no reason.  I should have about 340 GB free and it reads now only 18 GB free.  Can I have found the culprit (Revo Uninstaller Pro) because he stop to fill in after I removed it.  I can't find where all the "whatever" went.  I don't see anything funny in the registry and cannot find the strange files on the C drive under computer.  I wouldn't mess with the registry too but I as I am limited in my understanding of what's there.  I scanned the hard drive with my Avast Anti Virus and the Microsoft Emergency scan engine and found nothing.  If someone could give me an idea of what happened and how to get my rear disc space, I would be grateful.

    Avoid Revo Uninstaller Pro software type (including the registry cleaners "" and system optimizer).
    Programs and features does the job quite well.
    -There is no advantage to playing in the registry.

    -First run Disk Cleanup defragment the HARD disk in order to have a 'clean' basis of work form.

    -Treesize will show exactly what is there and how much of it.
    http://www.Jam-software.com/treesize_free/

    -Check how much space is used by System Restore.
    Restoration of the system- How do I

    -Indexing research is supposed to implement a very large file as well. You can limit where it indexes
    or turn it off completely in - Control Panel > Indexing Options
    -Check there is no software constantly writing/rewriting something. These activities have
    view in Task Manager-process.

    -Have another look through programs and features and see if there is has than nothing installed, you
    do not use or need and to uninstall, but software doesn't generally use a lot of space.

    .

Maybe you are looking for