When ASP is used to deal with SQL Server databases, query statements are essential. The SQL Server database itself provides a variety of query statements, but how to implement multi-condition dynamic query for the SQL Server database in ASP? When I use ASP to develop a SQL Server-based website, this problem is well solved. This article introduces the implementation methods.
Database definition
Define a database in SQL Server named "comm_server ". Define a table in the database. The table name is "operator" and contains the fields shown in the following table (take the five fields used in the program as an example ):
Field name remarks
Name: Varchar (20), which is defined as the primary key.
Educationallever degree (10)
Grade title Varchar (10)
State current status Varchar (10)
Time Record Time datetime
Design of input webpage
Define a form on the index_lele.htm page. The standard user interface elements used are as follows:
Name: Education degree: Select Title: Select Current status: Select
The TML program code is as follows:
<〈! -- Form is set to post. After the form is submitted, people_seek.asp processes it. --> --〉
<Form method = "post" action = "lele_seek.asp"> "〉
<Pre> 〉
<Font size = "2"> Name: </font> 〉
<Input type = "text" name = "txt_name" size = "10"> "〉
<Font size = "2"> Education level:
<Select name = "sel_xueli"> "〉
<Option value = "select"> select </option> 〉
<Option value = ""> secondary school </option> 〉
<Option value = "junior college"> Junior College </option> 〉
<Option value = "undergraduate"> Undergraduate </option> 〉
<Option value = "master"> Master </option> 〉
<Option value = "doctor"> Doctor </option> 〉
<Option value = "postdoctoral"> postdoctoral </option> 〉
</Select> 〉
Title:
<Select name = "sel_zhicheng"> "〉
<Option value = "select"> select </option> 〉
<Option value = "help"> Help </option> 〉
<Option value = "engineer"> engineer </option> 〉
<Option value = "senior engineer"> Senior Engineer </option> 〉
</Select> 〉
Current situation:
<Select name = "sel_zhuangkuang"> "〉
<Option value = "select"> select </option> 〉
<Option value = "in place"> in place </option> 〉
<Option value = "vacation"> vacation </option> 〉
<Option value = "business trip"> Business Trip </option> 〉
</Select> 〉
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