现象:Dim Fill01 As String="GoodsNo,GoodsName,BarCode, 后面还有很多的英文列名“Dim cmd As new SQL Command
'Dim DTb03 As DataTable ' It is PUBLIC DataTable
cmd.Con necti
cmd.Com mandText = "Sel ect & '"& Fill01 &"' from {VW_BD_Product} order by GoodsNo " 'Fill01 中装的全是英语列名。
DTb03 = cmd.Execu teReader() '主表
Tables(e.fo rm.name & "_table1").DataSource = DTb03
问题:在 Tables(e.fo rm.name & "_table1") 获得记录后,我如何用代码把这些列名变更成中文名称。
至于在Select 查询语句中提前设置 :GoodsNo AS ”中文名“ 的方法我知道的, 由于栏位过多,容易出错。
请教:1.如何在SQLTable 中选择性的变更一部分英文列名,
2.如何设置SQLTable 仅显示多少列数量(如:设置它仅显示5列),
3.如何把我自己选定的5列绑定到Tables(e.fo rm.name & "_table1")。
4.如何设备他的列宽。
烦请专家赐教一2条样本语句。
先谢谢狐表专家!
[此贴子已经被作者于2017/5/4 17:37:37编辑过]