Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Select box multiple SQL insert
I have a multiple select box in a form. I know that when this is submitted, it producers a string with all the selected values separated by commas. What I need to do is beable to take that string, no matter how many values it has, and insert a new row in to my table for each comma delimited item. (I am useing ASP classic and SQL Server 2000.) Here is a quick example of what I need:
1. User selects Widget A, Widget B, and Widget C from the select box and hits submit.
2. A string is passed to the next page that equals "Widget A, Widget B, Widget C"
3. I need to insert 3 new records into my SQL table, one for each item.
Of course, in my real world example, the user can, and most likely will, select a couple hundred items at once.
Any help in this matter would be greatly appreciated.
0 · ·