Find a record of the specified field in the database according to the record of the first letter

xiaoxiao2021-03-06  14

Find a record of the specified field in the database Press the first letter of the first letter: function getsqlstring (Byval Index) DIM ASCII (27) Dim Line, Row, Char, Strtempdim I, Jascii (1) = "45217, 45252" ASCII (2) = "45253, 45310; 45485, 45566; 45731, 45760" ASCII (3) = "45761, 45822; 45985, 46078; 46241, 46317" ASCII (4) = "46318, 46334; 46497, 46590; 46753, 46825" ASCII (5) = "46826, 46846; 47009, 47009" ASCII (6) = "47010, 47102; 47265, 47296" ASCII (7) = "47297, 47358; 47521, 47613" ASCII (8) = "47614, 47614 47777,47870; 48033,48118 "ASCII (9) =" "ASCII (10) =" 48119, 48126; 48289, 48382; 48545, 48638; 48801, 48894; 49057, 49061 "ASCII (11) =" 49062, 49150; 49313, 49323 "ASCII (12) =" 49324, 49406; 49569, 49662; 49825, 49895 "ASCII (13) =" 49896, 49918; 50081, 50174; 50337, 50370 "ASCII (14) =" 50371, 50430; 50593, 50613 "ASCII (15) =" 50614, 50621 "ASCII (16) =" 50622, 50686; 50849, 50905 "ASCII (17) =" 50906, 50942; 51105, 51198; 51361, 51386 "ASCII ( 18) = "51387,51445" ASCII (19) = "51446, 51454; 51617, 51710; 51873, 51966; 52129, 52217" ASCII (20) = "52218, 52222; 52385, 52478; 52641, 52697" ASCII ( 21) = "" ASCII (22) = "" ASCII (23) = "52698, 52734; 52897, 52979" ASCII (24) = "52980, 52990; 53153, 53246; 53665, 53688" ASCII (25) = "53689, 53758; 53921, 54014; 54177, 54270; 54433, 54480" ASCII (26) = "54481, 54526; 54689 , 54945, 55038; 55201, 55289 "if Index =" @ "Thengetsqlstring =" SELECT * from ARTICE WHERE SUBSTRING (Replace (Replace (Title, '",'), '",'), 1 1) in ('0', '1', '2', '3', '4', '5', '6', '

7 ',' 8 ',' 9 ') ORDER BY TITLE "EXIT FUNCTIONEND IFTSQLSTRING =" Select * from article where substring (replace (title,' ", ','), '",'), 1 , 1) in ("&" "& index &" "strTemp = ASCII (ASC (Ucase (Index)) - 64) IF strtemp <>" "" = split (strTemp, ";") for i = 0 To Ubound (Line) Row = Split (Line (i), ",") for j = row (0) to row (1) char = CHR (J - 65536) Getsqlstring = getsqlstring & ", '" & char & " ' "NextNextEnd IfGetSQLString = GetSQLString &") ORDER BY Title "End FunctionDim Connection, RecordsetSet Connection = Server.CreateObject (" "Set Recordset = Server.CreateObject) (" ADODB.Connection ADODB.Recordset ") Connection.Open" ... ... "RecordSet.open getsqlstring (" a "), connection ... '============================ ========================================

To make a simpler implementation, store the phrase of Chinese characters in another field when entering data! ! ! Depressed, I have found a more troublesome implementation method! Looking for her thousands of Baidu, the man is in a dim light.

转载请注明原文地址:https://www.9cbs.com/read-49554.html

New Post(0)