标题: 2006-5-20 ASP ACCESS 数据检索, 按拼音查找变态法 By Stabx
正文:
QUOTE:
作用说明:
本代码只能列出中文数据, 豆菜文不见
备注:
if code<>bt then
bt=1
while (bt<>0)
response.write bt&bt
bt=bt+1
wend
end if
CODE:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../Connections/conn.asp" -->
<!--#include virtual="include/globalabbr.asp"-->
<!--#include virtual="func/func-glossary.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body><br>
<%'拼音2
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'
' subject : ASP ACCESS 数据检索, 按拼音查找变态法 By Stabx
'
' writer : Stabx<shawl.qiu@gmail.com>
'
' blog : http://blog.csdn.net/btbtd ;\ http://btbtd.exblog.jp/ ;
'
' blog/site : Phoenix.GI - P.GI / \ 绿色学院 - Green Institute
'
' date : 2006-5-20
'
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
dim py,py1,py2
redim py(25),py1(25),py2(25)
py(0)="啊"
py(1)="八"
py(2)="擦"
py(3)="搭"
py(4)="鹅"
py(5)="发"
py(6)="嘎"
py(7)="哈"
py(8)="I"
py(9)="机"
py(10)="咖"
py(11)="拉"
py(12)="呣"
py(13)="嗯"
py(14)="哦"
py(15)="怕"
py(16)="七"
py(17)="然"
py(18)="撒"
py(19)="他"
py(20)="U"
py(21)="V"
py(22)="挖"
py(23)="西"
py(24)="呀"
py(25)="匝"
py1(0)="八"
py1(1)="擦"
py1(2)="搭"
py1(3)="鹅"
py1(4)="发"
py1(5)="嘎"
py1(6)="哈"
py1(7)="机"
py1(8)="I"
py1(9)="咖"
py1(10)="拉"
py1(11)="呣"
py1(12)="嗯"
py1(13)="哦"
py1(14)="怕"
py1(15)="七"
py1(16)="然"
py1(17)="撒"
py1(18)="他"
py1(19)="挖"
py1(20)="U"
py1(21)="V"
py1(22)="西"
py1(23)="呀"
py1(24)="匝"
py1(25)="匝"
py2(0)="A"
py2(1)="B"
py2(2)="C"
py2(3)="D"
py2(4)="E"
py2(5)="F"
py2(6)="G"
py2(7)="H"
py2(8)="I"
py2(9)="J"
py2(10)="K"
py2(11)="L"
py2(12)="M"
py2(13)="N"
py2(14)="O"
py2(15)="P"
py2(16)="Q"
py2(17)="R"
py2(18)="S"
py2(19)="T"
py2(20)="U"
py2(21)="V"
py2(22)="W"
py2(23)="X"
py2(24)="Y"
py2(25)="Z"
%>
<% '连接数据库
set rs=server.CreateObject("adodb.recordset") '创建 rs 数据查询
for i=0 to 24
rs.open "select * from ctarticle where title>='"&py(i)&"' and title<'"&py1(i)&"' order by title asc",MM_conn_string,1
response.write rs.recordcount&"<br/>"
do while not rs.eof
response.write py2(i)&" "&rs("title")&"<br/>"
rs.movenext
loop
response.write "<p/><p/>"
rs.close '关闭 rs 连接
next
rs.open "select * from ctarticle where title>='匝' order by title asc",MM_conn_string,1
response.write rs.recordcount&"<br/>"
do while not rs.eof
response.write py2(25)&" "&rs("title")&"<br/>"
rs.movenext
loop
rs.close '关闭 rs 连接
set rs=nothing
%><br>
<br>
<br>
啊,八
八,擦
擦,搭
搭,鹅
鹅,发
发,嘎
嘎,哈
哈,机
机,咖
咖,拉
拉,呣
呣,嗯
嗯,哦
哦,怕
怕,七
七,然
然,撒
撒,他
他,挖
挖,西
西,呀
呀,匝
IUV
</body>
</html>