Developing test database and online examination system with ASP (7)

Source: Internet
Author: User
Tags count functions
Five, Ado--activex data object operation database several steps

The first step is to set the database data source. To access the database, in the Control Panel, ODBC data Sources, set up the database name (select Users DSN), click the "Add" button, select the driver and files used in the database, and so on.

The second step uses "Server.CreateObject" to establish the connected object and use "open" to open the database to be accessed. Set Adocon=server.createobject ("ADODB. Connection "); ADOcon. Open "Zxtest"

The third step is to set the SQL command and use the Execute command to begin the action of accessing the database.

SQLSTR = "SELECT * from JSJWL where stbh like ' PD ' ORDER by STBH ASC"
Set rs = ADOcon. Execute (SQLSTR) ′adocon the name of the object that is set for step two

Step fourth uses the Recordset object's command to display the result, where RS is defined as the third step.

Rs.fields.count: Number of fields logged;
RS (i). Name: First (pointer) field name, I from 0 to rs.fields.count-1;
RS (i): reads the record of the first (pointer) field, I from 0 to rs.fields.count-1;
RS ("field name"): reads the record of the specified field; rs.eof: Whether the last bar has been specified;
Rs.movenext: Move the pointer to the next one; Rs.moveprev: Move the pointer to the previous one;
Rs.movefirst: Move the pointer to the first; Rs.movelast: Move the pointer to the last bar;

The fifth step is to close the database after use:

Rs.close;adocon.close

Vi. security and confidentiality of data

Because of the particularity of this system, the security and secrecy of data is very important. Confidentiality means that all information on the Internet should have a certain degree of confidentiality, and the content between different types of users is confidential. Security means that the user participates in an activity is a safe process, for all users of the action, the server is tracked. In order to ensure their safety and confidentiality, one should ensure that candidates can not cheat on the Internet, the second is to monitor the paper in real time, and three to strictly control the time. Mainly through the following two ways to achieve:

First, anyone who enters the online exam will have to go through user authentication (see image below). Moreover, different users have different operation rights, support to operate according to permissions, ensure the public and private data. Users are not allowed to perform illegal operations to prevent inadvertent or intentional destruction by the user.

Second, the user is not allowed to view all the paper's source files and copy functions, two methods:

1, prohibit the use of the right mouse button and other functions;

II, test paper in the paper library will be without drop-down menus and toolbars, such as the page format presented to visitors.

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.