Student Information Management System (IV)-module analysis and student information management system

Source: Internet
Author: User

Student Information Management System (IV)-module analysis and student information management system

The student information management system has been completed and the first acceptance is also carried out. The results are not very satisfactory. The previous summary was not published in time. Review it again and post it.

From today on, we have entered the code analysis phase. Now let's analyze several functions in the module.


Public Function ExecuteSQL (ByVal SQL As String, MsgString As String) As ADODB.Recordset
'executes SQL and returns Recordset
   Dim cnn As ADODB.Connection
   Dim rst As ADODB.Recordset
   Dim sTokens () As String
   
   On Error GoTo ExecuteSQL_Error
   
   sTokens = Split (SQL)
   Set cnn = New ADODB.Connection
   cnn.Open ConnectString
   
   If InStr ("INSERT, DELETE, UPDATE", UCase $ (sTokens (0))) Then 'Non-Select statement
      cnn.Execute SQL 'When the amount of data is not large, you can directly execute SQL statements on the connection
      MsgString = sTokens (0) & "query successful"
      'Although MsgString is not a return value, the transmission method is ByRef, and the actual parameter address is the same as this address
   Else 'Select statement
      Set rst = New ADODB.Recordset
      rst.Open Trim $ (SQL), cnn, adOpenKeyset, adLockOptimistic
      'Get the temporary table, the cursor points to the first record
      'get RecordCount,
      Set ExecuteSQL = rst
      MsgString = "Query to" & rst.RecordCount & _
         " Records "
   End If
   
ExecuteSQL_Exit:
   Set rst = Nothing
   Set cnn = Nothing
   Exit Function
   
ExecuteSQL_Error:
   MsgString = "Query error:" & _
      Err.Description
   Resume ExecuteSQL_Exit
End Function 



ExecuteSQL functions:

Description: query a string using an SQL statement and return an ADO record set.

1. split () function

Explanation: vt. Split; Separate

Computer Language explanation: returns a one-dimensional array with a subscript starting from scratch. It contains a specified number of substrings.

Syntax: Split (expression [, delimiter [, count [, compare])

Personal Understanding: split (SQL) refers to splitting the entire SQL statement into an array.

For example:

SQL = "select * from user_Info"

Split (SQL)
STokens (0) = select
STokens (1) = *
STokens (2) = from

STokens (3) = user_Info

In this way, a complete SQL statement is split into an array.

2. Instr () function
Meaning: string processing function. It returns the position of the string to be truncated in the source string.
Syntax: Instr ([start,] string1, string2 [, compare])
Start from the Start position (if omitted from the first place), find string2 in string1, and return 0 if not found.

For example:

If SQL = "select * from user_Info"

Then InStr ("INSERT, DELETE, UPDATE", UCase $ (sTokens (0) = 0




A database course design subject is the student achievement management system, which requires four modules: basic data, student information, and student achievement information query.

What's in the Failover class?

Requirement Analysis of student information management system

Haha, my graduation thesis. Let's take a look at the following. I am working on the Enrollment Management System for your reference.
System Requirement Analysis
4.1 Overall system design objectives
(1) The system is highly reliable and can validate the information of the input candidates, modify and delete the data, and stipulate the permissions of the enrollment staff.
(2) The modules in the system are highly reproducible and can facilitate the modification and maintenance of the recruitment staff.
(3) The system is easy, flexible, and simple to operate. The operator only needs to enter the basic information and enrollment data of the examinee.
(4) The system can efficiently and quickly query the examinee's basic information and enrollment plan, facilitating the development of enrollment.
4.2 system design requirements overview function analysis
This system provides the basic information management, enrollment plan management, and enrollment information management functions for candidates.
1. Basic information management of candidates: the admissions and Employment Office manages the basic information of candidates and provides the basic information of candidates.
(1) The examinee's basic information includes: Examination number, name, gender, account location, political outlook, nationality, age, date of birth, college entrance examination score, and volunteer filling.
(2) functions required: maintenance of the examinee's basic information, admission of candidates, and statistics of candidates
2. Enrollment Plan Management: Based on the enrollment information of each department in each province
(1) enrollment plans include: Faculty, province, and number of students
(2) demand implementation functions: maintenance of enrollment plans, query of enrollment plans, and statistics.
3. enrollment information management:
(1) enrollment information includes: selected candidates, scores, provincial enrollment quotas, and remaining places.
(2) functions of demand implementation: Statistics on enrollment information of each province, and statistics and summary of enrollment information of each department.
4. Other requirements: to reflect the concept of a database, you should try to create a database, create a table, maintain the table, transaction model, view, and security management functions in the system implementation.
4.3 Performance Requirements
(1) Security
In the case of high system configuration, high network bandwidth, and easy to guarantee, the performance requirement we need to consider most is the system security issue. In each stage of the development system, mutual authentication and authorization must be considered. Pay special attention to authentication. Simply put, it is to determine who is a specific user and verify the identity of the user for the security source. After processing the user identification method, you must use one method to authorize the user to use the specific functions of the system.

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.