您的位置:首页 > 其它

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)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: