NTS Forums

Please login or register.

Login with username, password and session length
 

News:

Welcome to the Newtek Technology Services Forum!


Author Topic: ASP 【Multi table insert and update】  (Read 776 times)

Offline ocm1

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
ASP 【Multi table insert and update】
« on: December 21, 2009, 10:54:40 PM »




how to insert multi data into senddata table?
when i using Do While loop get some error...
hope someone can help it ...

thk..


Offline CactusJuice

  • Hero Member
  • *****
  • Posts: 3,059
  • Karma: +20/-0
  • Cameron
    • Cactus Juice
Re: ASP 【Multi table insert and update】
« Reply #1 on: January 27, 2010, 04:48:41 PM »
In the ASP page, assemble your data into variables (normally one variable for each column to be inserted).  The data should be delimitted with a "|", comma, etc.  Then do all the looping in ONE stored procedure.  On each loop, parse your next set of data to insert.  The ASP page should call the stored procedure ONCE.  This is faster and easier on system resources. 

If you're stuck on were to start then first create the stored procedure to insert one round of data.  Get that working correctly.  Then upgrade the stored procedure's variables to hold delimitted data.  Get that working.  THEN go to your ASP file and work on assembling the data.