Solved

MM_INSERT

Posted on 2004-08-19
1
492 Views
Last Modified: 2010-05-18
I have an ASP page that i want to create 2 separate insert fuction on.

Is this possible?

the forms inserts will not in anyway be retated to each other.

I am using DWMX if i upgraded to DMMX04 is the function i want to achive able to be done ?



Willa
0
Comment
Question by:willa666
1 Comment
 
LVL 8

Accepted Solution

by:
alexhogan earned 500 total points
ID: 11842930
In a word.., yes its possible.

You will have to do some hand coding to accomplish this effectively.

What you would want to do is have two forms that submitted to the insert queries.

You would have the two seperate insert queries in a branching statement that is looking for a value from a hidden field in each of your forms.

Create your insert queries as you will and then hard code the values into the hidden fields on your form to match with the branching on your insert page.

Or,

If you wanted to only have one submittal then you would have to have a hidden field that would act as a seperator between the two series of inserted values.  You will need to insure that the names of the fields that you are gathering data from match the names of the fileds in your database. (I will explain in a minute)

You would want to work from the POST values directly so you can parse them at the hidden field value to seperate the two arrays.  Since you have named the fields collecting the data from your page the same as the field names in the database you will have a key=>value structure that you can use with a blanket query structure.

From there you can send the values from the two seperate arrays to the insert query along with the table value and just call this query twice.  Once for the first insert and once for the second.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question