Dim str As String = "Select 学生编号,学生姓名 From {学生基本信息} where mid(学生姓名,1,1) = \'" & txt.chars(0) & "\' or mid(学生姓名,1,2) = \'" & txt.substring(0,2) & "\' or mid(学生姓名,len(学生姓名)-1,1) = \'" & txt.charts(txt.length-1) & "\'"
老师出现这样提示
此主题相关图片如下:qq截图20180703102830.png
关键是理解代码,不要照搬。
Dim str As String = "Select 学生编号,学生姓名 From {学生基本信息} where mid(学生姓名,1,1) = \'" & txt.chars(0) & "\' or mid(学生姓名,1,2) = \'" & txt.substring(0,2) & "\' or mid(学生姓名,len(学生姓名)-1,1) = \'" & txt.chars(txt.length-1) & "\'"