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. SQL Writable Data

SQL Writable Data

Scheduled Pinned Locked Moved Web Development
csharpdatabasehelp
2 Posts 2 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.
  • I Offline
    I Offline
    Illegal Operation
    wrote on last edited by
    #1

    Help, I seem to have forgotten the code to write data from a page to SQL. I use C# The code is as follows: SqlCommand RegisterCMD = new SqlCommand("RegisterUser", Conn); RegisterCMD.CommandType = CommandType.StoredProcedure; RegisterCMD.Parameters.Add(new SqlParameter("@FirstName", SqlDbType.VarChar, 25)); RegisterCMD.Parameters(FirstName.Text); The last line I need some help.... Illegal Operation Making Computer Software Talk

    G 1 Reply Last reply
    0
    • I Illegal Operation

      Help, I seem to have forgotten the code to write data from a page to SQL. I use C# The code is as follows: SqlCommand RegisterCMD = new SqlCommand("RegisterUser", Conn); RegisterCMD.CommandType = CommandType.StoredProcedure; RegisterCMD.Parameters.Add(new SqlParameter("@FirstName", SqlDbType.VarChar, 25)); RegisterCMD.Parameters(FirstName.Text); The last line I need some help.... Illegal Operation Making Computer Software Talk

      G Offline
      G Offline
      Gavin Jeffrey
      wrote on last edited by
      #2

      Well it depends on what your stored proc does - if it does an insert/update call registerCMD.ExecuteNonQuery(); If it return something you can either call registerCMD.ExecuteReader(); or use a SqlDataApabter

      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