473,732 Members | 2,205 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Too many Decimal's in VB.net causes System.Executio nEngineExceptio n

So I have a fairly large VB.Net application, lots of objects, lots of
yucky OLEDB code. One day I started converting some Singles to Decimals
because I wanted to make some calculations as precise as possible.

Then I started getting System.Executio nEngineExceptio n's in a harmless
little function that does some simple arithemetic on Decimals.

I switched them back to Singles and now everything works fine again.

To make matters worse I've tested this on 2 machines. It works fine in
Debug mode, but Release mode gave me the System.Executio nEngineExceptio n.

Why me? I kind of liked the idea of exact precision Decimal data types,
so I'd rather not give them up.

And just for kicks here's the stats for both machines:
Two Dell's - 1 laptop, 1 desktop
Both Windows XP Pro, Visual Studio 2003 (.Net 1.1)
All Windows Updates & that jazz installed.
Jul 21 '05 #1
0 1572

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
3025
by: BA | last post by:
Hello, I have a string with a price in: "$14.95" I need to get it into a decimal. So I regex 'd the string and dumped the $. Debug mon shows a clean string "14.95" Then I do a System.Convert.ToDecimal on the clean string and the output
2
17668
by: probashi | last post by:
Hi, I am trying to the following: String s = "( 54.05)"; decimal d = decimal.Parse(s); when s = "( 54.05)" I what the value -54.05 and s = " 54.05" I what the value 54.05
11
39897
by: Lance | last post by:
VisualBasic.Hex converts from a decimal to a Hex string, but is there a way to convert a Hex string to a decimal?
1
7498
by: Mythran | last post by:
Dim value As Decimal = 1234.56 Dim format As String = _ "Positive $#,##0.00;Negative $#,##0.00;" Dim s As String = value.ToString(format) Dim d As Decimal = Decimal.Parse(s) The last line above throws an exception because it can't parse "Positive $1,234.56". It can convert to that format, but how can one go about parsing it using the same format that was used to format it as a string? Is there
0
361
by: michael | last post by:
So I have a fairly large VB.Net application, lots of objects, lots of yucky OLEDB code. One day I started converting some Singles to Decimals because I wanted to make some calculations as precise as possible. Then I started getting System.ExecutionEngineException's in a harmless little function that does some simple arithemetic on Decimals. I switched them back to Singles and now everything works fine again. To make matters worse...
6
25417
by: Tommy DN | last post by:
I think I've a simple question. I'm using the datatype "decimal". I need to build a sql - insert statement to save something in the database. But the problem is that the decimal - datatypes are written with a comma " , " and not " . ". So when I make the string: -- dim decimalvariable as decimal sql = "insert into table(decimalthing) values(" & decimalvariable & ")"
2
2148
by: John | last post by:
I have a stable app developed on ASP.NET 1.1 that I'm porting to 2.0. However, I've noticed that on one page, if I click a button to perform some business logic (which runs fine), then click on a hyperlink to move to a different page, I get a 'System.ExecutionEngineException' exception. There is no line highlighted in the debugger. I'm not using interop or other threads. Event viewer shows:
1
1684
by: .Net Sports | last post by:
I have an itemdatabound function whereas I am declaring a var named "price" as a decimal, and then want to reassign it to the value of a double datatype "dblTotalVolume", but I get an error "cannot implicitly convert type 'decimal' to 'double' , even tho in similar scripts with the exact same statements, I don't get an error and my function works: decimal price; price = System.Convert.ToDecimal(rowData); ??
9
2972
by: jpoe | last post by:
I have adopted this Code from an application built by consultants. My company needs to now pass decimal values for the 'discountRate' variable below. Using the debugger I receive and the program passes a correct integer to a webservice but when the database contains a decimal value a '0' value is received. I thought the data type (originally Int64) for the variable assignment was the problem but changing to 'decimal', 'double', or 'float' does...
0
9447
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9307
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9235
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9181
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.