全部博文(105)
分类: 数据库开发技术
2012-04-27 12:43:22
PB函数-设置数据窗口的更新属性
function string getupdatestring (powerobject dd, string as_tablename, string as_keys);//得到数
string ls_string
string ls_colname,ls_colnames
int li_colcount
int i
ls_string="DataWindow.Table.UpdateTable='"+as_tablename+"' datawindow.table.UpdateKeyInPlace=yes datawindow.Table.UpdateWhere=2"+" "
ls_string+=getattribstring(as_keys,'key',true)+" "
li_colcount=long(dd.dynamic Describe("DataWindow.Column.Count"))
for i=1 to li_colcount
ls_colname=string(dd.dynamic Describe("#"+string(i)+".name"))
ls_colnames=ls_colnames+ls_colname+','
next
ls_string+=getattribstring(ls_colnames,'update',true)
return ls_string
end function