以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]怎么用代码删除和添加列非临时表  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=11271)

--  作者:shacool
--  发布时间:2011/7/15 16:40:00
--  [求助]怎么用代码删除和添加列非临时表

[求助]怎么用代码删除和添加列非临时表

 

 

Dim pd As Date
pd=e.Form.Controls("DateTimePicker2").Value
Dim year As Integer = pd.Year
Dim month As Integer = pd.Month-1
Dim day As Integer = pd.Day
if Tables("报表明细").Cols.Contains("日期_31") then
  if day = 30 then
  DataTables("报表明细").DataCols.Delete("日期_31")
  end if
else
  if day = 31 then
  DataTables("报表明细").DataCols.Add("日期_31", GetType(Integer))
  end if
end if

我用临时表的删除方法没办法删除和添加


图片点击可在新窗口打开查看此主题相关图片如下:11.jpg
图片点击可在新窗口打开查看

--  作者:狐狸爸爸
--  发布时间:2011/7/15 17:10:00
--  

http://www.foxtable.net/help/topics/2122.htm

 


--  作者:shacool
--  发布时间:2011/7/18 10:21:00
--  

謝謝