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
  1. Home
  2. General Programming
  3. C#
  4. Problem in Update Btn Click .......... pls help me [modified]

Problem in Update Btn Click .......... pls help me [modified]

Scheduled Pinned Locked Moved C#
helpquestionannouncement
6 Posts 4 Posters 0 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.
  • A Offline
    A Offline
    amaankhan
    wrote on last edited by
    #1

    public static bool UpdateVisitor(string id,string n, string c, decimal p) { drow = ds.Tables[0].Rows.Add(); drow[0] = id; drow[1] = n; drow[2] = c; drow[3] = p; vda.UpdateCommand = vcb.GetUpdateCommand(); int res = vda.Update(ds.Tables[0]); if (res > 0) { System.Windows.Forms.MessageBox.Show("Visitor Details Updated"); return true; } else return false; } i am new. pls tell me what is wrong. i want to update the data ok.......... thanks in advance

    modified on Friday, September 25, 2009 1:27 AM

    C N 2 Replies Last reply
    0
    • A amaankhan

      public static bool UpdateVisitor(string id,string n, string c, decimal p) { drow = ds.Tables[0].Rows.Add(); drow[0] = id; drow[1] = n; drow[2] = c; drow[3] = p; vda.UpdateCommand = vcb.GetUpdateCommand(); int res = vda.Update(ds.Tables[0]); if (res > 0) { System.Windows.Forms.MessageBox.Show("Visitor Details Updated"); return true; } else return false; } i am new. pls tell me what is wrong. i want to update the data ok.......... thanks in advance

      modified on Friday, September 25, 2009 1:27 AM

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      New to the site, or new to C# ? If you're new to C#, then why are you writing this code ? I assume you're writing for learning purposes, there is no way you're writing production quality code. So, choose a simpler task, and learn your way up to what ever task it is you're trying to learn how to do. And, when you ask questions, don't say 'what is wrong'. Tell us what you want the code to do, what it does instead, what your efforts at debugging have told you already, etc.

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      1 Reply Last reply
      0
      • A amaankhan

        public static bool UpdateVisitor(string id,string n, string c, decimal p) { drow = ds.Tables[0].Rows.Add(); drow[0] = id; drow[1] = n; drow[2] = c; drow[3] = p; vda.UpdateCommand = vcb.GetUpdateCommand(); int res = vda.Update(ds.Tables[0]); if (res > 0) { System.Windows.Forms.MessageBox.Show("Visitor Details Updated"); return true; } else return false; } i am new. pls tell me what is wrong. i want to update the data ok.......... thanks in advance

        modified on Friday, September 25, 2009 1:27 AM

        N Offline
        N Offline
        nagendrathecoder
        wrote on last edited by
        #3

        Are u getting any error or what? Whats ur problem? :^) I hav few more Qs. 1) Where r u defining ur dataset "ds"? 2) Why u want ur return type Static?

        C 1 Reply Last reply
        0
        • N nagendrathecoder

          Are u getting any error or what? Whats ur problem? :^) I hav few more Qs. 1) Where r u defining ur dataset "ds"? 2) Why u want ur return type Static?

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          I love it when they ask dumb questions, and when you try to help, they never answer.

          Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

          N H 2 Replies Last reply
          0
          • C Christian Graus

            I love it when they ask dumb questions, and when you try to help, they never answer.

            Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

            N Offline
            N Offline
            nagendrathecoder
            wrote on last edited by
            #5

            :laugh: Its their loss. :laugh:

            1 Reply Last reply
            0
            • C Christian Graus

              I love it when they ask dumb questions, and when you try to help, they never answer.

              Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

              H Offline
              H Offline
              Henry Minute
              wrote on last edited by
              #6

              He asked the same question a couple of days ago. I can't remember, nor can I be bothered to check, if he got an answer then.

              Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

              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