473,756 Members | 3,663 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# Problem in coverting Currency Value in Number format

48 New Member
Hello,

I have written a Console application in C#, it basically imports data from tab delimited text files and save in SQl Server database. I am converting currency format of Mortgage value into Number format and saving in database. All works fine at my local machine but when I deployed the .Exe file in test environment I am getting below error message ... Couldn't store <"$182,458.00 "> in MortgageValue Column.

Can any one help me out how to resolve this ?

Error Loading Data for [\\davap0001\LPR S_OUTPUT\Client Interface\Test Region Wells Fargo CycleIII.TXT] - Error loading location data - System.FormatEx ception: Input string was not in a correct format.
at System.Number.P arseInt32(Strin g s, NumberStyles style, NumberFormatInf o info)
at System.String.S ystem.IConverti ble.ToInt32(IFo rmatProvider provider)
at System.Convert. ToInt32(Object value)
at System.Data.Com mon.Int32Storag e.Set(Int32 record, Object value)
at System.Data.Dat aColumn.set_Ite m(Int32 record, Object value)Couldn't store <"$182,458.00 "> in MortgageValue Column. Expected type is Int32.


Thanks,
Santosh
Dec 9 '07 #1
0 1540

Sign in to post your reply or Sign up for a free account.

Similar topics

3
11120
by: John L | last post by:
Well, another basic type of question...amazing how much I've forgotten - never was a VB guru, but. I can see I'll have to pick up a couple VB5 instruction books - any suggestions on a couple good (basic level) learning VB books? Okay - in my database I have a sales total box (textsalestotal) and want to multiply whatever that figure is by .07617 which is Missouri tax - if I just use a click event to multiply, for example $30.34 * .07617...
3
2128
by: Abby Lee | last post by:
I found the following script somewhere so I can change values to money before the form is printed. The page works for most people but not some. It worked fine for me but I get the yellow tri-angle with an exclamation point in the bottom left part of the window. When I told my IE to display a notification about every error...it told me there was a problem with line 11. What is wrong with this? 9 function formatCurrency(strValue) 10 {...
3
3010
by: news.shaw.net | last post by:
I have a subform that contains a currency field. If I tab my way to the field, everything works as desired, a number can be entered, and when I leave the field it is rendered as a currency amount. But if I click on the field with the mouse and enter a number, it shows up like this: 250.00$0.00 with the $0.00 appended to what I type. I have to delete it each time. I've tried a few VBA OnEnter solutions, but nothing has worked so...
5
7724
by: pelcovits | last post by:
How do I get Access to put a blank in a report column (but not eliminate the record completely), when the field in question is currency format, and the value is zero? My understanding is that null is not permitted as a currency value. thanks
14
12741
by: Just starting out | last post by:
I am very new to C code and I'm having a lot of trouble with a homework assignment. This program is supposed to take the amount of Euros that the user enters and convert it to US dollars. It runs fine if the user enters a number, but if the user enters a letter it loops. I have been working on this for 3 hours now, trying different things
7
4541
by: zlf | last post by:
1¡¢Here is a number. double nu = 123 2¡¢Format it with 3¡¢The result is "$123" I want to ask how to deformat "$123" to 123 Thx (Currency symbol is not restricted to '$')
11
2966
by: MikeY | last post by:
Hi Everyone, I'm trying to extract my pricing from my Access.mdb. Developing WinForm C#. I've read previous posts on the subject, but I'm still confused. In Access my "Price" is of "Currency" type. I extract my items "myDataItem.MyPrice(Convert.ToDecimal(myDataReader)); Now my problem like so many others is that if my dollar value is $10.00, and when I try to extract my data, it converts some how to just "10". How do I
2
1585
by: crferguson | last post by:
Hello all! I'm having the oddest issue trying to format a numeric string as currency without decimals. For instance... strSalary = "120000.56" strSalary = Format(strSalary, "$#,##0") 'this one returns "$#,##0" literally, no number strSalary = Format(strSalary, "C0") 'this one returns "C0" literally, no number
1
2090
by: pebelund | last post by:
Hi I got an .aspx that got the following code (example) <td width="120"> <% = row %> </td> row takes a value from a SQL db, that is a string of numbers. On the webbsite I want this to show as value formatted in thousands (example: I get the value 12345678, and I want it to show like 12 345
0
10032
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
9872
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...
0
9711
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
8712
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...
1
7244
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6534
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5303
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3358
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2666
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.