473,387 Members | 3,684 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Exceptions in published apps

I'm at a loss, i have published a program that works fine when run from code,
but produces exceptions when installed and run. I turned on option strict and
option explicit and turned all of the warnings on, then i went through and
handled all conversions etc until no errors or warnings of any kind were
found. When I run my app from the installation i still get a conversion
error. Any thoughts?

System.InvalidCastException: Conversion from string "" to type 'Integer' is
not valid. ---System.FormatException: Input string was not in a correct
format.
at Microsoft.VisualBasic.CompilerServices.Conversions .ParseDouble(String
Value, NumberFormatInfo NumberFormat)
at Microsoft.VisualBasic.CompilerServices.Conversions .ToInteger(String
Value)
--- End of inner exception stack trace ---
at Microsoft.VisualBasic.CompilerServices.Conversions .ToInteger(String
Value)
at AppTest.Form1.updateTotals()
at AppTest.Form1.retrieveData()
at AppTest.Form1.Form1_Load(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)

--
-John
Please rate when your question is answered to help us and others know what
is helpful.
Oct 31 '08 #1
2 995

at Microsoft.VisualBasic.CompilerServices.Conversions .ToInteger(String
Value)
at AppTest.Form1.updateTotals()
at AppTest.Form1.retrieveData()

The data you are retrieving must be bad. In your updateTotals method
you are choking on data that is being parsed from string into integer.
You must have a non-numeric character somewhere. I would look in your
data set for a floating point number or commas or something similar.
Are you sure you are using the same data in both cases? Are you testing
and running a debug version but deploying the release version or
vice-versa?
--
breitak67
Nov 1 '08 #2
I figured it out, i think i was looking at the data too long. The issue was i
was performing a calculation with a "" and that of course did not work. What
threw me off is that the error was in a function called by the sub not the
sub itself.
Thanks
--
-John
Please rate when your question is answered to help us and others know what
is helpful.
"breitak67" wrote:
>
at Microsoft.VisualBasic.CompilerServices.Conversions .ToInteger(String
Value)
at AppTest.Form1.updateTotals()
at AppTest.Form1.retrieveData()

The data you are retrieving must be bad. In your updateTotals method
you are choking on data that is being parsed from string into integer.
You must have a non-numeric character somewhere. I would look in your
data set for a floating point number or commas or something similar.
Are you sure you are using the same data in both cases? Are you testing
and running a debug version but deploying the release version or
vice-versa?
--
breitak67
Nov 2 '08 #3

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

Similar topics

33
by: Steven Bethard | last post by:
I feel like this has probably been answered before, but I couldn't find something quite like it in the archives. Feel free to point me somewhere if you know where this has already been answered. ...
9
by: Marty McDonald | last post by:
If I invoke a web service, and it throws an exception, I can see the exception if the client app is a .Net app. However, if the client app is not a .Net app, I only receive the HTTP 500 error. I...
10
by: Brian Folke Seaberg | last post by:
I was recently browsing a couple of C++ books at the local bookstore. One book called throwing exceptions from constructors a "dubious practice." Another book recommended not throwing...
8
by: wobbles | last post by:
Hi Everybody, How do I go about listening to events published by other apps? I know that my events are working internally (ie within my client), but when I subscribe to an event published by a...
16
by: Einar Høst | last post by:
Hi, I'm getting into the Trace-functionality in .NET, using it to provide some much-needed logging across dlls in the project we're working on. However, being a newbie, I'm wondering if some...
2
by: Eric Sabine | last post by:
I built a generic exception handler form which allows the user to get information from it, print it, email it, etc. for exceptions for which I explicitly didn't handle in code, such as missing...
1
by: Diego F. | last post by:
I use to show the error messages that I get in a try block. try { ... } catch (Exception ex) { ... (ex.Message); }
3
by: Rahul | last post by:
Hi, Is there a way to get the line numbers to display in the exception when you have published your web site? Thanks Rahul
8
by: Brent White | last post by:
I created and published a web service from my development system running XP and IIS to a Windows 2003 Standard server running IIS. When I try to access the service on the 2003 box, it keeps asking...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...

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.