日期:2014-05-16  浏览次数:21550 次

Access 取出汉字的拼音
select   *   from   表名   where   Tit   like   '% "+Request[ "strname "].ToString()+ "% ')


        Request[ "strname "].ToString()     这是在查询的时间传入的关健字(此时传入的是拼音).
    这就是我的主要一个查询语句,为了解决查询的时候,不能很方便的查询中文,我通过函数转换了传入的参数为拼音.
            现在的问题就是   怎么把[Tit]这个字段的值也转换成拼音?(存入的是汉字).

------解决方案--------------------
到具体的语言版块去问吧,参考
hzqp( "一 ")

Public Function HZQP(expression As String, Optional delimiter As String = " ", Optional limit As Integer = -1) As String

'expression
' 必需的?包含要转换的字符串?
'delimiter
' 可选的。用于标识分隔拼音的字符串字符。如果忽略,则使用空格字符( " ")作为分隔符。如果delimiter是一个长度为零的字符串,则返回仅包含一个元素,即完整的 expression字符串。
'limit
' 可选的。要返回拼音字符数,–1表示返回所有的拼音字符数,1表示返回拼音首字母。


Dim STR As String, arrWord(400) As String
Dim i As Integer, j As Integer
arrWord(1) = "吖a "
arrWord(2) = "哎ai "
arrWord(3) = "腤an "
arrWord(4) = "肮ang "
arrWord(5) = "凹ao "
arrWord(6) = "八ba "
arrWord(7) = "挀bai "
arrWord(8) = "扳ban "
arrWord(9) = "邦bang "
arrWord(10) = "勹bao "
arrWord(11) = "陂bei "
arrWord(12) = "奔ben "
arrWord(13) = "崩beng "
arrWord(14) = "皀bi "
arrWord(15) = "边bian "
arrWord(16) = "杓biao "
arrWord(17) = "憋bie "
arrWord(18) = "邠bin "
arrWord(19) = "仌bing "
arrWord(20) = "拨bo "
arrWord(21) = "峬bu "
arrWord(22) = "嚓ca "
arrWord(23) = "猜cai "
arrWord(24) = "飡can "
arrWord(25) = "仓cang "
arrWord(26) = "撡cao "
arrWord(27) = "冊ce "
arrWord(28) = "嵾cen "
arrWord(29) = "噌ceng "
arrWord(30) = "*cha "
arrWord(31) = "拆chai "
arrWord(32) = "辿chan "
arrWord(33) = "伥chang "
arrWord(34) = "抄chao "
arrWord(35) = "车che "
arrWord(36) = "抻chen "
arrWord(37) = "阷cheng "
arrWord(38) = "吃chi "
arrWord(39) = "充chong "
arrWord(40) = "抽chou "
arrWord(41) = "出chu "
arrWord(42) = "搋chuai "
arrWord(43) = "巛chuan "
arrWord(44) = "刅chuang "
arrWord(45) = "吹chui "
arrWord(46) = "旾chun "
arrWord(47) = "踔chuo "
arrWord(48) = "呲ci "
arrWord(49) = "从cong "
arrWord(50) = "凑cou "
arrWord(51) = "粗cu "
arrWord(52) = "汆cuan "
arrWord(53) = "崔cui "
arrWord(54) = "邨cun "
arrWord(55) = "搓cuo "
arrWord(56) = "咑da "
arrWord(57) = "呆dai "
arrWord(58) = "丹dan "
arrWord(59) = "当dang "
arrWord(60) = "刀dao "
arrWord(61) = "恴de "
arrWord(62) = "灯deng "
arrWord(63) = "仾di "
arrWord(64) = "敁dian "
arrWord(65) = "刁diao "
arrWord(66) = "爹die "
arrWord(67) = "丁ding "
arrWord(68) = "丟diu "
arrWord(69) = "东dong "
arrWord(70) = "剅dou "
arrWord(71) = "嘟du "