以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]Replace不起作用 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=187178) |
-- 作者:tkxffb -- 发布时间:2023/6/28 22:39:00 -- [求助]Replace不起作用 请老师看一下,下面的代码,想用Replace进行替换,但不起作用,替换不成功 Dim t1 As String = e.Form.Controls("TextBox1").Text Dim t2 As String = e.Form.Controls("comboBox2").Text Dim jdb As String = CurrentTable.Current("街道办") Dim zz As String = CurrentTable.Current("住址") Dim drs As List(of DataRow) = DataTables("人员信息表").Select("[住址] Like \'%" & t1 & "%\'and [街道办] = \'" & jdb & "\'") For i As Integer = drs.count - 1 To 1 Step - 1 drs(i)("住址") = drs(i)("住址").Replace( t1 ,t2 ) Next
[此贴子已经被作者于2023/6/28 22:40:18编辑过]
|
-- 作者:tkxffb -- 发布时间:2023/6/28 23:05:00 -- 上面的可以用,不麻烦老师了,谢谢 |