ASP in the use of arrays to achieve database records of the batch input method (original), there are demonstrations, suggestions into the essence

Source: Internet
Author: User
Tags array arrays microsoft frontpage
The Essence | data | database | array | Batch input method using array to realize database record in original ASP (original)
Demo: http://www.zwtd.com/1/yanek/n/needdj2.asp
<%
REM article topic ASP using array to realize the batch input method of database record (original)
Author: Yanek
Contact Email:aspboy@263.net
%>

Includes two files
1. Allneeddj.asp: Implementing Form Generation
2. allneeddjresult.asp processing Form Batch Input
3.hbedu.mdb: Database files
Its database structure is as follows
Provinceid: Province number numeric type
Dytaocount: Proofing the number of arrays
Papertaocount: pattern Number of numbers
Cpcontent: The value of the content of the film
FileName: FileName text type
Beizhu: Memo Note type

In this example, 10 records, 6 fields per record are described.

1. Allneeddj.asp


<meta http-equiv= "Content-language" content= "ZH-CN" >
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<meta name= "generator" content= "Microsoft FrontPage 4.0" >
<meta name= "ProgId" content= "FrontPage.Editor.Document" >
<title> Requirements Registration </title>

<body>



<%
Set Conn=server.createobject ("Adodb.connection")
Conn. Open driver={microsoft Access Driver (*.mdb)};d bq= "& _
Server.MapPath ("Hbedu.mdb")

%>

<form method= "POST" action= "allneeddjresult.asp" >
<div align= "center" >
<center>
<table border= "1" width= "M" bordercolorlight= "#FFFFFF" >
<tr>
&LT;TD width= "660" colspan= "6" >
<p align= "center" > Requirement Registration </td>
</tr>
<tr>
&LT;TD width= "si" align= "center" > Province </td>
&LT;TD width= "align=" "Center" > Proofing Sheets </td>
&LT;TD width= "align=" "Center" > Pattern Sheets </td>
&LT;TD width= "align=" "Center" > Content </td>
&LT;TD width= "align=" "Center" > FileName </td>
&LT;TD width= "328" align= "Center" >
<p align= "center" > Notes </td>
</tr>


<%
REM generates different name form fields dynamically by looping
For I=1 to 10
%>
<%
Set Rs=server.createobject ("Adodb.recordset")
Sql= "SELECT * from Provinceinfo"
Rs.Open sql,conn,1,1



Set Rs1=server.createobject ("Adodb.recordset")
Sql1= "SELECT * from filename"
Rs1.open sql1,conn,1,1
%>


<tr>
&LT;TD width= "si" ><select name= "<% Response.Write" data1 "&i%>"
Size= "1" >
<%
Do as not rs.eof
If Province=cstr (RS ("id")) Then
Sel= "Selected"
Else
Sel= ""
End If



Related Article

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.