Using collections to bulk manipulate databases in ASP

Source: Internet
Author: User
As we know, query operations in general relational databases (such as SQL Server, Oracle, Access, and so on) support collection operations.
For example, you can use the Update ATable Set Field1 = avalue where Field2 in (VALUE21,VALUE22) to complete the data
A batch update operation for the library. We can make full use of this collection characteristics of the database to improve the efficiency of ASP page operation database. As we
You can list multiple records on a page, let the user select the records to be manipulated, and then do a batch operation after the user determines the action, with a
It is significantly more efficient to record the operation once.
One, the collection properties of HTML
First, let's familiarize ourselves with the collection properties of HTML. In the form data or query parameter, when the
When multiple submitted parameters take the same name, the parameter values form a collection that can be obtained from the ASP page or
The number of parameters with the same name. As in the following page (set.htm), 6 check boxes take the same parameter name MyCheckBox, whose values
are 1, 2, 3, 4, 5, 6.
<!--set.htm-->
<p> Select the item you want to work with, and the item you selected will be displayed when you submit the data.
<form method= "POST" action= "set.asp" >
<br>1, <input type= "checkbox" Name= "MyCheckBox" value= "1" >
<br>2, <input type= "checkbox" Name= "MyCheckBox" value= "2" >
<br>3, <input type= "checkbox" Name= "MyCheckBox" value= "3" >
<br>4, <input type= "checkbox" Name= "MyCheckBox" value= "4" >
<br>5, <input type= "checkbox" Name= "MyCheckBox" value= "5" >
<br>6, <input type= "checkbox" Name= "MyCheckBox" value= "6" >
<br><input type= "Submit" value= "submitted data" Name= "B1" >
</form></body>
When the client selects the item to display, the following ASP page (set.asp) gives the number of items selected by the client and their values.
<!--set.asp-->
<%@ LANGUAGE = VBScript%>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.