datawindow简单的动态加列
2014-03-05 16:07
260 查看
//简单的动态加列
//作者:xys_777
//永生20100404 - 动态增加列 f_create_delcol
string ls_rt
string ls_dwsyntax,ls_modfiy
long ll_PosBeg, ll_PosEnd
int i
ls_dwsyntax = this.describe("datawindow.syntax")
ll_PosBeg = Pos(Lower(ls_dwsyntax), "table(column=")
do
i++
ll_PosEnd = ll_PosBeg
ll_PosBeg = Pos(Lower(ls_dwsyntax), "column=", ll_PosBeg+1)
loop while ll_PosBeg>0
ll_PosEnd = Pos(Lower(ls_dwsyntax), "~r~n",ll_PosEnd)
ls_modfiy = replace(ls_dwsyntax,ll_PosEnd+2,1,"column=(type=char(10) name=is_del dbname=~"is_del~")~r~n")
string error_create
this.Create(ls_modfiy, error_create)
IF Len(error_create) > 0 THEN
messagebox("",error_create)
END IF
this.settransobject(sqlca)
ls_rt=this. modify('create column(band=detail id='+string(i)+' alignment="0" tabsequence=1 border="0" color="33554432" x="23" y="8" height="76" width="1000" name=is_del visible="0" background.color="536870912")')
if len(ls_rt)>0 then messagebox('',ls_rt)
//作者:xys_777
//永生20100404 - 动态增加列 f_create_delcol
string ls_rt
string ls_dwsyntax,ls_modfiy
long ll_PosBeg, ll_PosEnd
int i
ls_dwsyntax = this.describe("datawindow.syntax")
ll_PosBeg = Pos(Lower(ls_dwsyntax), "table(column=")
do
i++
ll_PosEnd = ll_PosBeg
ll_PosBeg = Pos(Lower(ls_dwsyntax), "column=", ll_PosBeg+1)
loop while ll_PosBeg>0
ll_PosEnd = Pos(Lower(ls_dwsyntax), "~r~n",ll_PosEnd)
ls_modfiy = replace(ls_dwsyntax,ll_PosEnd+2,1,"column=(type=char(10) name=is_del dbname=~"is_del~")~r~n")
string error_create
this.Create(ls_modfiy, error_create)
IF Len(error_create) > 0 THEN
messagebox("",error_create)
END IF
this.settransobject(sqlca)
ls_rt=this. modify('create column(band=detail id='+string(i)+' alignment="0" tabsequence=1 border="0" color="33554432" x="23" y="8" height="76" width="1000" name=is_del visible="0" background.color="536870912")')
if len(ls_rt)>0 then messagebox('',ls_rt)
相关文章推荐
- Windows Phone开发(39):漫谈关键帧动画上篇
- 如何将mysql表结构导出成Excel格式的(并带备注)
- C# 判断文件有没占用
- Gossip protocol(zz)
- Hierarchy--分层。单词意思即为分层视图。
- 证明算法复杂度
- 程序员应知——关注细节
- Toast 在service中出现的问题
- 静态内部类
- 监听返回键
- anagrams
- 什么时候加上android.intent.category.DEFAULT和LAUNCHER
- UIImageView
- hdu 2041 超级楼梯
- iphone 内存管理【转】
- JAX-B【转】
- 如何使用 Google app engine 建立soap应用
- C/C++结构体初始化
- C++ 默认构造函数
- 纯CSS实现3D图像轮转