February 2nd, 2004, 03:07 PM
Multiple record insertion
I have been searching to try and find a way to do a multiple record insertion from one form. I understand that it can be done with loops but is there an extension out that there that I can download either in coldfusion or dreamweaver? Also, was wondering if anyone knew if it is possible to do in dreamweaver?
February 2nd, 2004, 03:17 PM
What you are looking for is the SELECT INTO operator. Check your database documentation for examples on how this is done.
However, if for some reason your database does not support SELECT INTO, then no, there is no extension to CF or Dreamweaver to let you do this. You'll have to write a loop to handle multiple inserts either in CFML or as a stored procedure.
February 2nd, 2004, 03:22 PM
Okay, that doesn't work because I am using a checkbox as the submit button and would like for a window to pop and verify that it is to be inserted and then insert if that is what needs to be done. But for some reason all of my variables aren't being passed into that form.
February 2nd, 2004, 03:26 PM
You're trying to do too much at the same time. Start by using a standard form and posting it in the standard way to a target page. Get the multiple inserts working. Then slowly add or change the code.
I guess the bottom line is that multiple inserts can be done with 100% certaintly in CF, either with a loop or with SELECT INTO in the query. So the problem must be in the way you are handling the form or performing your query.
February 2nd, 2004, 03:49 PM