The overall architecture of cainiao's flying System

Source: Internet
Author: User

1User name Logon

Since the user name is required to log on to the database for query, but the query statement is wrong, not only does not have data, but the direct consequence is that the system reports errors, it cannot be used before you log on to your system. SoProgramPersonnel should think of all possible situations in advance to ensure the normal use of the software, that is, the fault tolerance of the software is better.

Combined with SQL query statements, if "'" and "=" are avoided, these symbols will directly cause incorrect statements and prompt error messages.

 
Private sub txtusername_keypress (keyascii as integer) dim s as string dim I as integer for I = 1 to Len (txtusername. text) S = mid (txtusername. text, I, 1) If s like "'" or s like "=" then txtusername = Replace (txtusername. text, S, "") end if next end sub

2 password control

In addition to the basic limits of the user name, you must also consider not to enter Chinese characters. Generally, they are uppercase/lowercase letters (case-sensitive), numbers, and some special characters.

However, there must be a limit on the number of digits, which is a common error.

3 decimal Input

 In the beginning, I only wanted to limit the number to be input. But then I thought that if the score is decimal, what should I do? So this decimal must be there? How can I limit decimal places. Limit one decimal point.

Method

Private sub txtcash_change () dim s as string dim X () as string if (isnumeric (txtcash. text) Then X = Split (txtcash. text ,". ") if (ubound (x)> = 1) then if (LEN (x (ubound (x)> 1) Then txtcash. TEXT = s txtcash. selstart = Len (txtcash. text) end if S = txtcash. text end sub
4I have never thought about some extreme situations

(In fact, this is the most important thing to consider)

Database A has no data, and a lot of data is used for testing.

B. For example, if the student ID is defined as a number and dozens of numbers are entered, an error occurs because the number is out of range, but no error message is returned.

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.