以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]代码求助【已解决】 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=122724) |
-- 作者:浙江仔 -- 发布时间:2018/8/1 8:37:00 -- [求助]代码求助【已解决】 红色的字段赋值代码走不通,该怎么改? For Each dr As DataRow In drs Dim r As Row =Tables("TJ_Ent_info").AddNew() Dim nms() As String ={"enterprise_id","enterprise_name","reg_address","ent_manage_state_code","industry_type_code","is_up_scale","ent_scale","dept_id","prod_address","legal_repr","contact_tel","principal","principal_mphone","principal_lphone","emp_num","specia_num","GRID_ID","AREA_ID","proddist_code","INDUSTRY_REGULATION_DEPT","AAB001"} For Each dc As String In nms r(dc)= dr(dc ) Next \'r.save() Next [此贴子已经被作者于2018/8/1 9:21:39编辑过]
|
-- 作者:有点甜 -- 发布时间:2018/8/1 8:47:00 -- 代码没问题,报什么错?
http://www.foxtable.com/webhelp/scr/1533.htm
[此贴子已经被作者于2018/8/1 8:47:21编辑过]
|
-- 作者:浙江仔 -- 发布时间:2018/8/1 8:59:00 -- 数据都是空的 |
-- 作者:浙江仔 -- 发布时间:2018/8/1 9:16:00 -- 改了这个就对了 Dim r As DataRow =DataTables("TJ_Ent_info").AddNew()
|
-- 作者:有点甜 -- 发布时间:2018/8/1 9:26:00 -- 以下是引用浙江仔在2018/8/1 9:16:00的发言:
改了这个就对了 Dim r As DataRow =DataTables("TJ_Ent_info").AddNew()
如果你表格的主键不是_Identify自动递增的方式,必须用datatables进行addnew新增行。 |