Forums

ASP

This topic is locked

Multiple record insert

Posted 04 Mar 2002 22:03:03
1
has voted
04 Mar 2002 22:03:03 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 new 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
End If
%>

Thanks In Advance,
Lane



Reply to this topic