access中将文本里的日文替换为Jn0、Jn1、Jn2...但是运行SQL查询语句的时候弹出错误:无效的过程调用或参数,调试卡在Jencode = Replace(Jencode, F(i), E(i))这一句上,我看参数传递都是对的,为什么会运行失败呢?
Public Function Jencode(ByVal iStr As String) As String
If IsNull(iStr) Or IsEmpty(iStr) Then
Jencode = ""
Exit Function
End If
Dim F, i, E
E = Array("Jn0;", "Jn1;", "Jn2;", "Jn3;", "Jn4;", "Jn5;", "Jn6;", "Jn7;", "Jn8;", "Jn9;", "Jn10;", "Jn11;", "Jn12;", "Jn13;", "Jn14;", "Jn15;", "Jn16;", "Jn17;", "Jn18;", "Jn19;", "Jn20;", "Jn21;", "Jn22;", "Jn23;", "Jn24;", "Jn25;")
F = Array(ChrW(12468), ChrW(12460), ChrW(12462), ChrW(12464), ChrW(12466), ChrW(12470), ChrW(12472), ChrW(12474), ChrW(12485), ChrW(12487), ChrW(12489), ChrW(12509), ChrW(12505), ChrW(12503), ChrW(12499), ChrW(12497), ChrW(12532), ChrW(12508), ChrW(12506), ChrW(12502), ChrW(12500), ChrW(12496), ChrW(12482), ChrW(12480), ChrW(12478), ChrW(12476))
Jencode = iStr
For i = 0 To 25
Jencode = Replace(Jencode, F(i), E(i))
Next
End Function