Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Graph Problem in c# Windows Form when using ADO.NET

Graph Problem in c# Windows Form when using ADO.NET

Scheduled Pinned Locked Moved C#
helpcsharpdatabasesql-servervisual-studio
1 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nt_virus
    wrote on last edited by
    #1

    Hello. I m stuck with a problem of graph at the end. I downloaded a source to create a graph in VS 2005. When I run the source it works fine.. There are two ListBoxes in that source, 1st (ul_lbx_DataKey) containing String and 2nd(ul_lbx_DataValue) containing, Float as well as INT... I want to add data on those listbox from my SQL Server through ADO.NET ... I can add those successfully, but unfortunately, when i click on SHOW GRAPH button, Error Throws.. *There are two listbox 1 and listbox 2 *Datakey = listbox 1 ,, value == listbox2 *No problem in ListBox 1 *Problem in listbox 2. *When I add STRING item in listbox2, It throws and INCORRECT FORMAT error ////////// --- According to programming this is correct. *When I add INT item in listbox2, NO error ////////// --- According to programming this is correct. *When I add FLOAT item in listbox2, NO error ////////// --- According to programming this is correct. *In database, I changed the datatype of the column binded in listbox 2 .. First I did varchar == ERROR // According to problem, this is correct *Second, int == Throws Error /// This is WRONG. *Third FLOAT == Throws Error // This is wrong either. ---------------------------- System.FormatException was unhandled Message="Input string was not in a correct format." Source="mscorlib" StackTrace: at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseSingle(String value, NumberStyles options, NumberFormatInfo numfmt) at System.Single.Parse(String s, NumberStyles style, NumberFormatInfo info) at System.Single.Parse(String s) at GraphV1.Form1.ui_btn_Show_Click(Object sender, EventArgs e) in C:\Documents and Settings\nt_virus - Dell\Desktop\temp\GraphV\GraphV1\GraphV1\Form1.cs:line 46 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups