以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 通过循环内向表加入数据,只能加入一条 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=170545) |
-- 作者:xa139 -- 发布时间:2021/7/29 23:33:00 -- 通过循环内向表加入数据,只能加入一条 Dim rz As Row = Tables("runno_zhujichen").AddNew() Dim htbh As String = Functions.Execute("formatname",e.form.controls("textbox2").text) htbh =htbh.ToUpper() If InStr(htbh ,"|") > 0 Then Dim Values() As String Values = htbh.split("|") For Index As Integer = 0 To Values.Length - 1 Tables("runno_zhujichen").AddNew() rz("发票号") = e.form.controls("textbox1").text rz("合同编号") =Values(Index) rz.Save() rz.load() Next Else rz("发票号") = e.form.controls("textbox1").text rz("合同编号") =htbh rz.Save() rz.load() End If
|
-- 作者:有点蓝 -- 发布时间:2021/7/29 23:37:00 -- Values = htbh.split("|") For Index As Integer = 0 To Values.Length - 1 rz = Tables("runno_zhujichen").AddNew() rz("fa piao号") = e.form.controls("textbox1").text rz("合同编号") =Values(Index) rz.Save() rz.load() Next
|
-- 作者:xa139 -- 发布时间:2021/7/29 23:47:00 -- Dim htbh As String = Functions.Execute("formatname",e.form.controls("textbox2").text) If InStr(htbh ,"|") > 0 Then Dim Values() As String Values = htbh.split("|") Dim rz As Row = Tables("runnozhujichen").AddNew(Values.Length ) For Index As Integer = 0 To Values.Length - 1 rz = Tables("runnozhujichen").AddNew() rz("发票号") = e.form.controls("textbox1").text rz("合同编号") =Values(Index) Next rz.Save() rz.load() Else Dim rz As Row = Tables("runnozhujichen").AddNew() rz("发票号") = e.form.controls("textbox1").text rz("合同编号") =htbh.ToUpper() rz.Save() rz.load() End If 找到了,已解决 [此贴子已经被作者于2021/7/29 23:48:33编辑过]
|
-- 作者:有点蓝 -- 发布时间:2021/7/30 8:33:00 -- Dim rz As Row = Tables("runnozhujichen").AddNew(Values.Length ) 改为 Dim rz As Row
|