Exceptions in published apps

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?Sm9obiBCdW5keQ==?=

    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.InvalidC astException: Conversion from string "" to type 'Integer' is
    not valid. ---System.FormatEx ception: Input string was not in a correct
    format.
    at Microsoft.Visua lBasic.Compiler Services.Conver sions.ParseDoub le(String
    Value, NumberFormatInf o NumberFormat)
    at Microsoft.Visua lBasic.Compiler Services.Conver sions.ToInteger (String
    Value)
    --- End of inner exception stack trace ---
    at Microsoft.Visua lBasic.Compiler Services.Conver sions.ToInteger (String
    Value)
    at AppTest.Form1.u pdateTotals()
    at AppTest.Form1.r etrieveData()
    at AppTest.Form1.F orm1_Load(Objec t sender, EventArgs e)
    at System.EventHan dler.Invoke(Obj ect sender, EventArgs e)
    at System.Windows. Forms.Form.OnLo ad(EventArgs e)
    at System.Windows. Forms.Form.OnCr eateControl()
    at System.Windows. Forms.Control.C reateControl(Bo olean fIgnoreVisible)
    at System.Windows. Forms.Control.C reateControl()
    at System.Windows. Forms.Control.W mShowWindow(Mes sage& m)
    at System.Windows. Forms.Control.W ndProc(Message& m)
    at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
    at System.Windows. Forms.Container Control.WndProc (Message& m)
    at System.Windows. Forms.Form.WmSh owWindow(Messag e& m)
    at System.Windows. Forms.Form.WndP roc(Message& m)
    at System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
    at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
    at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg,
    IntPtr wparam, IntPtr lparam)

    --
    -John
    Please rate when your question is answered to help us and others know what
    is helpful.
  • breitak67

    #2
    Re: Exceptions in published apps


    at Microsoft.Visua lBasic.Compiler Services.Conver sions.ToInteger (String
    Value)
    at AppTest.Form1.u pdateTotals()
    at AppTest.Form1.r etrieveData()

    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

    Comment

    • =?Utf-8?B?Sm9obiBCdW5keQ==?=

      #3
      Re: Exceptions in published apps

      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.Visua lBasic.Compiler Services.Conver sions.ToInteger (String
      Value)
      at AppTest.Form1.u pdateTotals()
      at AppTest.Form1.r etrieveData()
      >
      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
      >

      Comment

      Working...