Home  >  Article  >  Database  >  Knowledge points about student information management system

Knowledge points about student information management system

一个新手
一个新手Original
2017-09-19 09:43:072241browse


1. Variant data type explanation:

A variant type of variable definition
means: I have defined this variable now, but I don’t Determine what type will be assigned to it for future operations, so first temporarily borrow a location (space) from the memory to put the variable. When the actual operation is performed in the future, the corresponding type will be dynamically assigned to the variable as needed

Knowledge points about student information management system

2. Exit sub in the process

The function of exit sub is to end the current process and no longer execute subsequent programs. The meaning of

Knowledge points about student information management system

in this code is: if it is detected that the text box is empty, the subsequent process will not be executed, and the cursor will be set in the user name text box.

3. call viewdate

Call statement is used to call functions or sub-processes.
Viewdata comes from the function name or sub-process name.

Three ways to call a function or subroutine:

  1. Directly write the name of the function or subroutine;

  2. Call using variable or object assignment;

  3. Call with Call statement;

4. mrc and mrcc

Dim Mrc as ADODB.Record
Dim mrcc as ADODB.Record
These are two different record sets defined. Each record set has its own node position during code running and does not interfere with each other. However, by judging the logical content of one record set, another record set can make an event that is consistent with the judgment.
The following code is to judge whether the input content meets the code requirements through the loop judgment of the mrcc record. If it meets the code requirements, delete the previous mrc record and update the new record. Here mrcc is only used as a basis for judging whether the input content is correct or not, and has nothing to do with mrc. (Thanks to Lian Kang for the explanation, although the understanding is not very good.)

txtSQL = "select * from class_info"Set mrcc = ExecuteSQL(txtSQL, MsgText)    
If Not (mrcc.EOF Or mrcc.BOF) Then
        mrcc.MoveFirst        
        While (mrcc.EOF = False)            
        If (Trim(mrcc.Fields(0)) = Trim(txtClassno.Text) And Trim(mrcc.Fields(1)) = Trim(combograde.Text) And _                Trim(mrcc.Fields(2)) = Trim(txtDirector.Text) And Trim(mrcc.Fields(3)) = Trim(txtClassroom.Text)) Then
                MsgBox "班号或年级已经存在,请重新输入!", vbOKOnly + vbExclamation, "警告"
                mrcc.Close
                txtClassno.Text = ""
                txtClassno.SetFocus                
                Exit Sub
            Else
                '移动到下一条记录
                mrcc.MoveNext            
                End If
        Wend
        mrc.Delete
        mrcc.Close
        mrc.AddNew
        mrc.Fields(0) = Trim(txtClassno.Text)
        mrc.Fields(1) = Trim(combograde.Text)
        mrc.Fields(2) = Trim(txtDirector.Text)
        mrc.Fields(3) = Trim(txtClassroom.Text)
        mrc.Update        
        MsgBox "更新数据成功!", vbOKOnly + vbExclamation, "修改班级信息"
    Else
         Exit Sub
    End If

5. Re-learning some properties

Form properties:

windowstate-settings The size of the form when it is first displayed (if it is set to Maximized or Minimized, the size of the form cannot be set through the Size property)
MDIChild - Convert the SDI (Single Document Interface) of the form to MDI (Multiple Document Interface)

Document properties:

passwordchar——Set text uniform characters
ScrollBars——Used to set scroll bar mode, there are four options:

  • ScrollBars.None (no scroll bar),

  • ScrollBars.Horizontal (horizontal scroll bar),

  • ScrollBars.Vertical (vertical scrolling bars),

  • ScrollBars.Both (horizontal and vertical scroll bars).

Note: This attribute value is only valid when the MultiLine attribute is true. When the WordWrap property value is true,
The horizontal scroll bar will not work

MultiLine - Returns or sets a value that indicates whether the TextBox control can accept and display multiple lines of text

The above is the detailed content of Knowledge points about student information management system. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn