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. Data from text box

Data from text box

Scheduled Pinned Locked Moved C#
database
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.
  • S Offline
    S Offline
    sajid salim khan
    wrote on last edited by
    #1

    I have a simple text box and a button when i click on a button the data must be saved to a table in sql how it can bedone sas

    P 1 Reply Last reply
    0
    • S sajid salim khan

      I have a simple text box and a button when i click on a button the data must be saved to a table in sql how it can bedone sas

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #2

      Write some code.

      S 1 Reply Last reply
      0
      • P PIEBALDconsult

        Write some code.

        S Offline
        S Offline
        sajid salim khan
        wrote on last edited by
        #3

        SqlCommand myCommand = new SqlCommand("INSERT INTO Designation (Designation) " + "Values ('string')", myConnection); the problem is in this line how to insert a text box value in the values place sas

        M 1 Reply Last reply
        0
        • S sajid salim khan

          SqlCommand myCommand = new SqlCommand("INSERT INTO Designation (Designation) " + "Values ('string')", myConnection); the problem is in this line how to insert a text box value in the values place sas

          M Offline
          M Offline
          Matthew Cuba
          wrote on last edited by
          #4

          sajid.salim.khan wrote:

          SqlCommand myCommand = new SqlCommand("INSERT INTO Designation (Designation) " + "Values ('string')", myConnection); the problem is in this line how to insert a text box value in the values place

          What about myTextBox.Text? That'll give you the contents of the textbox.

          It isn't enough to do well in life. One must do good when and where one can. Otherwise, what's the point?

          S 1 Reply Last reply
          0
          • M Matthew Cuba

            sajid.salim.khan wrote:

            SqlCommand myCommand = new SqlCommand("INSERT INTO Designation (Designation) " + "Values ('string')", myConnection); the problem is in this line how to insert a text box value in the values place

            What about myTextBox.Text? That'll give you the contents of the textbox.

            It isn't enough to do well in life. One must do good when and where one can. Otherwise, what's the point?

            S Offline
            S Offline
            sajid salim khan
            wrote on last edited by
            #5

            i have done that but how to placeit in the value of mycommand parameter SqlCommand myCommand = new SqlCommand("INSERT INTO Designation (Designation) " + "Values HERE ('string')", myConnection); sas

            C 1 Reply Last reply
            0
            • S sajid salim khan

              i have done that but how to placeit in the value of mycommand parameter SqlCommand myCommand = new SqlCommand("INSERT INTO Designation (Designation) " + "Values HERE ('string')", myConnection); sas

              C Offline
              C Offline
              Chintan Desai
              wrote on last edited by
              #6

              programmer can learn only by googling around in MSDN or somethng like this. Dont, expect direct answer in CodeProject.Try somethings by yourself...

              Regards Chintan www.visharadsoft.com (I am thinking to change humans to computer, but unfortunately GOD will not give me the source code)

              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