Absrtact: This system is based on the development of modern campus and the design of the student file management system, the system can facilitate teachers, parents to find students in the school. To realize the whole school student information online inquiry. You can also input information to the new students. Because the student class situation is complex, may realize the information modification, adjusts the student's basic situation in time.
Key words
ASP Online Inquiry information Input information modification
I. Production of databases and establishment of data sources
1. Make a database with Microsoft Access, name it information, then make a table named Infor. Write the data field below. As shown in the figure:
2, the establishment of ODBC data source (in the professional system set up)
Steps:
Control Panel à admin tools àodbc data source à system DSNÀADD....ODBC interface
second, the system interface
A good system needs a friendly user interface. Because the system is based on ASP development, we use web tools to create a user-friendly user interface. Some of the interfaces are as shown in the picture:
Enter the interface:
Information Entry Interface
Information inquiry
III. implementation of the procedure
Because this system is based on the ASP development to realize the on-line operation system. Therefore, the completion of the system needs to use HTML, and because HTML is the basis of web programming, so, here is to omit the HTML code, I believe we are all HTML master.
1. Information entry
<%
Dim strsql,rs
Set Conn=createobject ("Adodb.connection")//Establish ADODB connection
Conn.Open ("dsn=information; uid=; pwd=; ") Open Data source information
Set Rs=createobject ("ADODB. Recordset ")//Establish a Record object Rs
Rs.Open "Infor", conn,3,3//Open the Infor table in the database
Rs. Addnew//Add a new record
RS ("name"). Value=request.form ("name")/* Get table Single-name for the contents of name "send" to the database name record (Note: Table Single-name is the information entry interface in the message is the name of the form field names, similar to the following) * * *
RS ("Sex"). Value=request.form ("Sex")
RS ("Birth"). Value=request.form ("Birthday")
RS ("zzmm"). Value=request.form ("ZZ")
RS ("teach"). Value=request.form ("teach")
RS ("XL"). Value=request.form ("XL")
RS ("class"). Value=request.form ("class")
RS ("school"). Value=request.form ("school")
RS ("Add"). Value=request.form ("Add")
RS ("tel"). Value=request.form ("tel")
RS ("Hy"). Value=request.form ("Mar")
RS ("JG"). Value=request.form ("addr")
RS ("Career"). Value=request.form ("career")
RS ("date"). Value=request.form ("Time")
RS ("school"). Value=request.form ("school")
Rs. Update//Save records in the database
Response.Write ("You have successfully registered the student's information.") Please continue <a href= ' input.htm ' > Registration </a> ')//Display Tips
Rs.close//Close data records
Conn.close//Close connection
Set rs=nothing
Set conn=nothing
%>
2. Information Inquiry
<%
Dim strsql,conn,rs
Set Conn=server.createobject ("Adodb.connection")
Conn.Open ("dsn=information; uid=; pwd=; ")
Set Rs=server.createobject ("ADODB. Recordset ")
Strsql= "SELECT * from infor where name= '" & Request ("name") & ""////Build query using SQL
Rs.Open Strsql,conn
%>
<table width= "1205" border= "1" align= "left" bordercolor= "#6600CC" >
<tr>//Bank write the corresponding Chinese name of the field to be displayed
<TD width= "><div" align= "center" ><font size= "2" > Name </font></div></td>
<TD width= "><div" align= "center" ><font size= "2" > Sex </font></div></td>
<TD width= "122" ><div align= "center" ><font size= "2" > Year of birth </font></div></td>
<TD width= "><div" align= "center" ><font size= "2" > Education </font></div></td>
<TD width= "><div" align= "center" ><font size= "2" > Political visage </font></div></td>
<TD width= "><div" align= "center" ><font size= "2" > Professional </font></div></td>
<TD width= "><div" align= "center" ><font size= "2" > Class </font></div></td>
<TD width= "><div" align= "center" ><font size= "2" > class teacher </font></div></td>
<TD width= "122" ><div align= "center" ><font size= "2" > Admission time </font></div></td>
<TD width= "146" ><div align= "center" ><font size= "2" > Tel </font></div></td>
<TD width= "337" ><div align= "center" ><font size= "2" > Contact address </font></div></td>
</tr>
<% While not rs.eof%>//Loop statement controls qualifying record output
<tr>//Bank can repeat output according to cyclic conditions
<td><div align= "center" ><font size= "2" ><%=rs ("name")%></font></div></td >
/* The value of the Name field that matches the condition in the output database * *
<td><div align= "center" ><font size= "2" ><%=rs ("Sex")%></font></div></td >
<td><div align= "center" ><font size= "2" ><%=rs ("Birth")%></font></div></td >
<td><div align= "center" ><font size= "2" ><%=rs ("XL")%></font></div></td>
<td><div align= "center" ><font size= "2" ><%=rs ("zzmm")%></font></div></td >
<td><div align= "center" ><font size= "2" ><%=rs ("career")%></font></div></td >
<td><div align= "center" ><font size= "2" ><%=rs ("class")%></font></div></td >
<td><div align= "center" ><font size= "2" ><%=rs ("teach")%></font></div></td >
<td><div align= "center" ><font size= "2" ><%=rs ("date")%></font></div></td >
<td><div align= "center" ><font size= "2" ><%=rs ("tel")%></font></div></td >
<td><div align= "center" ><font size= "2" ><%=rs ("add")%></font></div></td > </tr>
<% Rs.movenext
Wend
Rs.close
Conn.close
%>
</table>
3. Information modification
<%
Set Conn=server.createobject ("Adodb.connection")
Conn.Open "dsn=information; uid=; pwd=; "
Set Rs=server. CreateObject ("Adodb.recordset")
Username=request ("name")//Get the value of the name form assigned to username
Strsql= "SELECT * from infor where name= '" &username& ""///Create SQL query
Rs.Open strsql,conn,3,3
%>
<form action= "zhuce.asp" method= "POST" >
To save a modified record to a database by post by using the Zhuce.asp page's program
<table width= "75%" border= "1" align= "center" bordercolor= "#663399" >
<tr>
<TD width= "18%" ><div align= "right" ><font "2" > Name size=
<TD width= "36%" ><font size= "2" >
<input name= "name" type= "text" id= "name" value= "<%=rs.fields (" name ")%>" >
</font></td>//Display the value of the Name field in the database that matches the query criteria for modification
<TD width= "15%" ><div align= "right" ><font "2" > Admission time size=
<TD width= "31%" ><input name= "Time" type= "text" id= "Time" value= "<%=rs.fields (" date ")%>" ></TD " >
</tr>
<tr>
<TD height= "><div align=" right "><font size=" 2 "> Sex:</font></div></td>
<td><p>
<label>
<input name= "Sex" type= "Radio" value= "<%=rs.fields" ("Sex")%> "checked>"
Male </label>
<label>
<input type= "Radio" name= Sex "value=" <%=rs.fields ("Sex")%> ">
Female </label>
<br>
</p></td>
<td><div align= "right" ><font size= "2" > Professional:</font></div></td>
<td><input name= "Career" type= "text" id= "career" value= "<%=rs.fields (" career ")%>" ></td>
</tr>
<tr>
<td><div align= "right" ><font size= "2" > Birth date:</font></div></td>
<td><font size= "2" >
<input name= "Birthday" type= "text" id= "Birthday" value= "<%=rs.fields (" Birth ")%>" >
</font></td>
<td><div align= "right" ><font size= "2" > Class:</font></div></td>
<td><input name= "Class" type= "Text" Id= "class" Value= "<%=rs.fields (" class ")%>" ></td>
</tr>
<tr>
<td><div align= "right" ><font size= "2" > Political face:</font></div></td>
<td><select name= "zz" id= "zz" >
<option value= "Member" > member </option>
<option value= "Party Member" > Party member </option>
<option value= "Other" > Other </option>
</select></td>
<td><div align= "right" ><font size= "2" > class teacher:</font></div></td>
<td><input name= "teach" type= "text" id= "teach" Value= "<%=rs.fields (" teach ")%>" ></td>
</tr>
<tr>
<td><div align= "right" ><font size= "2" > Education:</font></div></td>
<td><font size= "2" >
<select name= "XL" id= "XL" >
<option value= "Junior High School" > Junior </option>
<option value= "High School" > High School </option>
<option value= "College" > College </option>
<option value= "Undergraduate" > Undergraduate </option>
<option value= "Postgraduate" > Graduate </option>
<option value= "Other" > Other </option>
</select>
</font></td>
<td><div align= "right" ><font size= "2" > Classroom:</font></div></td>
<td><input name= "Room" type= "text" id= "Room" ></td>
</tr>
<tr>
<td><div align= "right" ><font size= "2" > Original Graduate school:</font></div></td>
<td><font size= "2" >
<input name= "School" type= "text" id= "school" value= "<%=rs.fields (" school ")%>" >
</font></td>
<TD colspan= "2" rowspan= "5" ><div align= "left" >
<p><font color= "#FF0000" size= "2" > Please data Entry personnel carefully input the student information in order to </font></p>
<p><font color= "#FF0000" size= "2" Query after >! </font></p>
</div></td>
</tr>
<tr>
<td><div align= "right" ><font size= "2" > Contact address:</font></div></td>
<td><font size= "2" >
<input name= "Add" type= "text" id= "Add" value= "<%=rs.fields" ("Add")%> ">
</font></td>
</tr>
<tr>
<td><div align= "right" ><font size= "2" > Tel:</font></div></td>
<td><font size= "2" >
<input name= "Tel" type= "text" id= "tel" value= "<%=rs.fields (" tel ")%>" >
</font></td>
</tr>
<tr>
<td><div align= "right" ><font size= "2" > Marital status:</font></div></td>
<td><select name= "Mar" id= "Mar" >
<option value= "Married" > married </option>
<option value= "Unmarried" > Unmarried </option>
</select></td>
</tr>
<tr>
<td><div align= "right" ><font size= "2" > Birthplace:</font></div></td>
<td><font size= "2" >
<input name= "addr" type= "text" id= "addr" value= "<%=rs.fields (" JG ")%>" >
</font></td>
</tr>
</table>
<table width= "75%" border= "0" >
<tr>
<td><div align= "center" >
<input type= "Submit" Name= "Submit2" value= "Save" >
</div></td>
<td><input type= "reset" name= "reset" value= "rewrite" ></td>
</tr>
</table>
<p> </p>
</form>