Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Multiple insert record

Posted 28 Feb 2002 23:39:57
1
has voted
28 Feb 2002 23:39:57 lane c posted:
I have the following code that inserts two new records. I want to be able to loop MM_editCmd.Execute X number of times depending on what is selected in a combo box, so if someone selects 8 from the box, 8 records will be inserted.

' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command"
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close

If (MM_editRedirectUrl <> "" Then
Response.Redirect(MM_editRedirectUrl)
End If
End If

Thanks In Advance,
Lane

End If
%>

Reply to this topic