Author: Gu Jian hey, long time did not write anything, this time for the teacher let me test test their stuff and found a problem with special characters filtering lax, so they re-wrote a function to filter special characters. Function ChkinvaildWord (Words) Const Invaildwords = "SELECT | Update | DELETE | INSERT | @ | - |
Chkinvaildword = trueinvaildword = split (InvaildWords, "|") inWords = LCase (Trim (Words))
For i = lbound (invaildword) To Ubound (InwordWord) IF INSTR (INVAILDS, INVAILDWORD (I))> 0 THEN Chkinvaildword = true exit function end ifnext chkinvaildword = falseEnd Function is relatively simple, do not say it. However, I am ready to use for each ... next ..., I don't know why it is wrong, so I use the for loop, I feel uncomfortable, but I can use it! (PS: Today, today's headache all day, I don't know when this damn headache can be good, Otherwise, tomorrow's work can be broken! I look forward to there will be a good state tomorrow!)