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. Web Development
  3. ASP.NET
  4. update query

update query

Scheduled Pinned Locked Moved ASP.NET
databasehelpannouncement
5 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.
  • M Offline
    M Offline
    mylogics
    wrote on last edited by
    #1

    hii..... i wanna update the table column name Description (Having single row) through a multiline textbox.table name is ManageAboutJA. i hav written following code but still its not updatin..can u help me..plz do help string str = "UPDATE ManageAboutJA SET Description=@Descrip"; SqlCommand cmd = new SqlCommand(str,conn); conn.Open(); cmd.Parameters.Add("@Descrip",TextBox2.Text); cmd.ExecuteNonQuery(); conn.Close(); thanks...

    B V B 3 Replies Last reply
    0
    • M mylogics

      hii..... i wanna update the table column name Description (Having single row) through a multiline textbox.table name is ManageAboutJA. i hav written following code but still its not updatin..can u help me..plz do help string str = "UPDATE ManageAboutJA SET Description=@Descrip"; SqlCommand cmd = new SqlCommand(str,conn); conn.Open(); cmd.Parameters.Add("@Descrip",TextBox2.Text); cmd.ExecuteNonQuery(); conn.Close(); thanks...

      B Offline
      B Offline
      Blue_Boy
      wrote on last edited by
      #2

      UPDATE ManageAboutJA SET Description=@Descrip where emailcolumname='email'


      I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post.

      M 1 Reply Last reply
      0
      • B Blue_Boy

        UPDATE ManageAboutJA SET Description=@Descrip where emailcolumname='email'


        I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post.

        M Offline
        M Offline
        mylogics
        wrote on last edited by
        #3

        i dont want to use where clause.m also usin multiline textbox.... plz reply....bro...

        modified on Thursday, July 23, 2009 3:44 AM

        1 Reply Last reply
        0
        • M mylogics

          hii..... i wanna update the table column name Description (Having single row) through a multiline textbox.table name is ManageAboutJA. i hav written following code but still its not updatin..can u help me..plz do help string str = "UPDATE ManageAboutJA SET Description=@Descrip"; SqlCommand cmd = new SqlCommand(str,conn); conn.Open(); cmd.Parameters.Add("@Descrip",TextBox2.Text); cmd.ExecuteNonQuery(); conn.Close(); thanks...

          V Offline
          V Offline
          Vimalsoft Pty Ltd
          wrote on last edited by
          #4

          Good Day pariofshona This is the most Dangerous Statement

          UPDATE ManageAboutJA SET Description=@Descrip

          This will update all the Records in the table, anyway its thats what you want Cool. PLease give us more info , why do you say its not updating, ofcause you dont see results in your db. Please more

          Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

          1 Reply Last reply
          0
          • M mylogics

            hii..... i wanna update the table column name Description (Having single row) through a multiline textbox.table name is ManageAboutJA. i hav written following code but still its not updatin..can u help me..plz do help string str = "UPDATE ManageAboutJA SET Description=@Descrip"; SqlCommand cmd = new SqlCommand(str,conn); conn.Open(); cmd.Parameters.Add("@Descrip",TextBox2.Text); cmd.ExecuteNonQuery(); conn.Close(); thanks...

            B Offline
            B Offline
            Baran M
            wrote on last edited by
            #5

            pariofshona wrote:

            cmd.Parameters.Add("@Descrip",TextBox2.Text)

            I didnt find any method with parameter_name and object. Instead you can use cmd.Parameters.AddWithValue method.

            Education is not a way to escape poverty — it is a way of fighting it.

            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