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. ASP.NET w/ Sql Server 2000

ASP.NET w/ Sql Server 2000

Scheduled Pinned Locked Moved ASP.NET
databasecsharpasp-netsql-serversysadmin
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.
  • L Offline
    L Offline
    lxhan
    wrote on last edited by
    #1

    I'm having some problems trying to use one insert statement to load multiple records into the database, Sql Server 2000. The data is captured from a web form, but I don't want to use multipe insert statements for 25 data strings. I know Sql Server has Insert/Select or Insert/Exec, but this copy one table to another. Any recommendations would be appreciated!

    S 1 Reply Last reply
    0
    • L lxhan

      I'm having some problems trying to use one insert statement to load multiple records into the database, Sql Server 2000. The data is captured from a web form, but I don't want to use multipe insert statements for 25 data strings. I know Sql Server has Insert/Select or Insert/Exec, but this copy one table to another. Any recommendations would be appreciated!

      S Offline
      S Offline
      Spanky3
      wrote on last edited by
      #2

      Hey there, I would recommend using stored procedures as they would be ideal for your situation lets take the following example: Sign Up Form: 2 Tables 1- Users 2- UserInfo You would like to insert data into Users and then take the Unique ID generated and insert that into UserInfo. The traditional method is to : INSERT INTO........ twice Using a stored procedure is like storing the method on the server. From your code you call the stored procedure and simply pass it the parameters which it requires. http://webdevelopment.developersnetwork.com/Articles.asp?Article=223[^] This is an OK exmaple/tutorual on stored procedures but if you can invest i highly reccomend: http://www.amazon.co.uk/exec/obidos/ASIN/1861007418/qid%3D/026-3028095-7898815[^] Which is brilliant to get your knowledge upto scratch, it includes a very useful chapter purely on stored procedures.

      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