create的问题

0清风0 2004-04-20 01:33:11
我用 dw_2.create(str)直接创建的 数据窗口对象,他怎么立刻就检索数据,我根本都没用 retrieve这个是为什么呀。
...全文
38 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
0清风0 2004-04-20
  • 打赏
  • 举报
回复
我的 str(数据窗口对象的语法)是用程序合并的。
这是主要代码。
string ls_objects,str,band_name,band_name1
integer i,ls
long ll_y

str=''
id_1=0
str='release 7;~r~n'
str=str+'datawindow(units=0 timer_interval=0 color=16777215 processing=0 HTMLDW=no print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 96 print.margin.bottom = 96 print.paper.source = 0 print.paper.size = 0 print.prompt=no print.buttons=no print.preview.buttons=no)~r~n'
ls_objects=dw_1.describe("datawindow.objects")
//将各带区高度等相关信息写如 数据窗口对象 (dw_band)
FOR i=1 TO dw_band.rowcount()
band_name = dw_band.getitemstring(i,"objname")
if i - 1>0 then
band_name1=dw_band.getitemstring(i - 1,"objname")
ll_y=Long(dw_1.Describe(band_name+".Y")) - Long(dw_1.Describe(band_name1+".Y")) - Long(dw_1.Describe(band_name1+".Height"))
else
ll_Y= Long(dw_1.Describe(band_name+".Y"))
end if
dw_band.setitem(i,"Y",long(dw_1.Describe(band_name+".Y")))
dw_band.setitem(i,'height',long(dw_1.Describe(band_name+".height")))
dw_band.setitem(i,'width',ll_y)

//判断是否为分组的带区
ls=dw_group.find("sort='"+band_name+"'",1,dw_group.rowcount())
if ls<=0 then
str=str+mid(band_name,16)+'(height='+string(ll_y -2)+' color="536870912" )~r~n'
else
//messagebox("",dw_1.Describe(band_name+".height"))
dw_group.setitem(ls,'resetpageno',ll_y)
end if
NEXT
//恢复表相关信息
str=str+f_tablecolumn_syntax()
str=str+f_group()
file://恢复对象相关信息(包括相关的列信息)
str=str+f_table_obj()
str=str+'~r~nhtmltable(border="1" cellpadding="0" cellspacing="0" generatecss="no" nowrap="yes") '
integer ll
mle_1.text=str
ll=dw_2.create(mle_1.text)

基本上就是这个样子了,不过中间有几个生成 select的语句。
program8005 2004-04-20
  • 打赏
  • 举报
回复
如果你只是单纯的使用这个create语句,是不可能检索数据的,只能出现一个没有数据的数据窗口。你可能是别的地方错了。

1,077

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧