Print Page | Close Window

Adding multiple records - How?

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=1205
Printed Date: 29 March 2026 at 5:16am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Adding multiple records - How?
Posted By: Spyda
Subject: Adding multiple records - How?
Date Posted: 21 March 2003 at 11:24am
Hey there

I am getting somewhat lost with my insert code. I have an upload page where the user selects name, address etc then seklects a a manufacturer (ManufacturerID) and then may check 4 dynamic checkboxes (CategoryID)

I have a main table called products that has 2 foreign keys from tables Manufacturer and Category.

I have insert code as follows but I am unsure what code goes just below it to loop through and insert the additional records:


Code:
<%
If Request("selected") Then
ProductsRS.addnew
ProductsRS("CategoryID")=Request("CategoryID")
ProductsRS("ManufacturerID")=Request("ManufacturerID")
ProductsRS("Product")=Request("Product")
ProductsRS("Description")=Request("Description")
ProductsRS("Image")=Request("Image")
ProductsRS("Price")=Request("Price")
ProductsRS.update
ProductsRS.requery
ProductID=ProductsRS("ProductID")

*** NOT SURE OF CODE HERE****

next
Response.Redirect("Default.asp")
end if
%>


Does anyone have any ideas?

Thank you



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net