以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  集合  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=130298)

--  作者:lfz123
--  发布时间:2019/1/18 10:34:00
--  集合
比如,我想提取不同的产品名称,然后组合成一个字符串:产品名称1、产品名称2、产品名称3 改怎样写代码呢?
Dim Products As List(Of String)
Products DataTables("产品").GetValues("产品名称")
For
 Each Product As String In Products
--  作者:有点甜
--  发布时间:2019/1/18 10:37:00
--  

方法一:http://www.foxtable.com/webhelp/scr/1435.htm

 

方法二:

 

Dim Products As List(Of String)
Products = DataTables("产品").GetValues("产品名称")
Dim str = String.join(",", products.ToArray)
msgbox(str)


--  作者:wyz20130512
--  发布时间:2019/1/18 10:37:00
--  
\'\'\'
Dim s As String = DataTables("产品").GetComboListString("产品名称")
s = s.Replace("|","、")
[此贴子已经被作者于2019/1/18 10:39:54编辑过]

--  作者:lfz123
--  发布时间:2019/3/28 16:56:00
--  回复:(wyz20130512)'''Dim s As String = DataTabl...
替换字符"、",输入时变成了?,在怎么处理啊
--  作者:有点甜
--  发布时间:2019/3/28 16:58:00
--  

参考

 

http://www.foxtable.com/webhelp/scr/1273.htm