View Single Post
  #1 (permalink)  
Old April 9th, 2007, 03:02 PM
melkin melkin is offline
Authorized User
Points: 483, Level: 7
Points: 483, Level: 7 Points: 483, Level: 7 Points: 483, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2007
Location: Edgewood, NY, USA.
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Default INSERT Multiple rows to database

Hi All.

I am using .asp classic NOT .NET!

I have a database called "oddlistorders" that users add to it when they shop around and select certain products. Once done, they can view thier cart which is the "oddlistorders" database.

I then need to take all that they ordered which each row has a unique user ID and customer code and pass it to another database called "oddlistprocessed".

They problem is, it works fine if thwy only order ONE item (one row of data), but if they order more than one item, I cant inssert more than one row at a time.

Here is what I use now which works perfectly for ONE item:
<%
Dim quantity
quantity = Request.Form("quantity")

sql= "Update oddlist Set quantity='"& quantity & "' WHERE user_ID=" & ID

Rs.Open sql, Conn
Conn.Close
Set Rs=Nothing
Set Conn = Nothing

%>

Thanks!!
Reply With Quote