Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Multiple Inserts Single Submission Same Table

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-02-16 : 08:02:47
Rich writes "This may be a fairly easy answer but I have had difficulty finding the answer and now I am turning to the pros for assistance. This is what I am trying to accomplish.

I have an INSERT statement with information being pulled(upload.form) from the form. Example, text field named SubmitIssue1 will populate field SubmitIssue field in the database. SubmitDate1 will populate field SubmitDate1, and so on. However, what I am trying to do accomplish to expand the form to allow the user the ability to add another instance of an issue where they will use the SubmitIssue2 text area. I want to pull their name and email address from the top of the form and use it as well as this new information in SubmitIssue2 to create a new record. The information from SubmitIssue2 with populate the SubmitIssue field. HOW CAN THIS BE DONE? Please help with some examples of how this would look.

This is a short example of what I have:

SQL = "INSERT INTO TAMPAORDERS(Filename, YourName, YourEmail, SubDate, CaseYear1, CaseNumber1) VALUES('"

SQL = SQL & Replace(Upload.Form("YourName"), "'", "''") & "', '"
SQL = SQL & Replace(Upload.Form("YourEmail"), "'", "''") & "', '"
SQL = SQL & Replace(Upload.Form("SubDate"), "'", "''") & "', '"
SQL = SQL & Replace(Upload.Form("CaseYear1"), "'", "''") & "', '"
SQL = SQL & Replace(Upload.Form("CaseNumber1"), "'", "''") & "', "")""
   

- Advertisement -