暂用数据库吧:
Dim n as integer
Dim T,T1 as string
Dim dr,dr1 As DataRow
dr = e.DataRow
if e.DataCol.Name = "名称" then
if dr("名称") Is Nothing then
dr("拼音") = Nothing
else
for n = 0 to dr("名称").Length-1
T1 = dr("名称").substring(n,1)
dr1 = DataTables("拼音").Find("[字] = '" & T1 & "'")
if dr1 Isnot Nothing then
T = T & dr1("音")
else
T = T & T1
End if
Next
dr("拼音") = T.ToUpper
End If
End if
[此贴子已经被作者于2009-2-28 13:46:36编辑过]