Inserting Data into Multiple Rows of Database
I'm looking for a tutorial on inserting data from a UD4 form into multiple rows of a SQL Server database table. I've searched all over DMXZone.com, and closest I was able to find was a tutorial named "Multiple delete using Javascript " at http://dmxzone.com/ShowDetail.asp?NewsId=3430. I thought I could somehow change it to an Insert to do what I need...a page that inserts multiple records from one form into one table. My plan is to get the Delete Behavior to work first using the script from that page, then I was going to change it to an Insert page.
I know that it needs to be something like:
SELECT STATEMENT:
INSERT INTO dbo.Example1(1,2)
SELECT('var1','var2')
FROM dbo.Example2
WHERE 1 = 'var1'
VARIABLES:
var1 % Request.Form("checkbox")
var2 % Session("s2")
...but I've not been able to get this to work. The above example enters all of the data into one row using commas. (Ex: 1, 2, 3...) A lot of other users have also requested this tutorial, so I think it would be a great help and a great addition to your site. Thanks.
KWilliams
kwilliams@douglas-county.com
Comments
Be the first to write a comment
You must me logged in to write a comment.