动态改变DataWindow控件窗口中内容的几种实现方法
来源:互联网 发布:淘宝店铺团队架构 编辑:程序博客网 时间:2024/05/29 03:26
动态改变DataWindow控件窗口中内容的几种实现方法(适合初学者)(网友 lingyun)
网友:lingyun Email: marine@yanan.xmu.edu.cn
在程序运行过程中,要动态的改变DataWindow控件窗口中内容的可用多种方法实现:
1.创建多个DataWindow对象,在程序运行时,通过一按钮控件的Click事件来改变DataWindow对象
if dw_control.dataobject=d_object1 then
dw_control.dataobject=d_object2
else
dw_control.dataobject=d_object1
end if
dw_control.settransobject(SQLCA)
dw_control.retrieve()
2.使用setsqlselect函数
dw_control.setsqlselect("select * from table1")
dw_control.retrieve()
3.使用modify函数
dw_control.modify("datawinodw.table.select='select * from table1'")
4.使用create(syntax{,errorbuffer})函数
syntax有三种方法实现:
调用libraryexport()
调用syntaxfromsql()
用户自定义
如:
string ls_select,ls_present
ls_select="select * from table1 where name like 'l%'"
ls_present="style(type=form)"
ls_syntax=SQLCA.syntaxfromsql(ls_select,ls_present)
dw_control.create(ls_syntax)
dw_control.settransobject(SQLCA)
dw_control.retrieve()
5.或者自己动态创建一个DataWindow控件
打开new user boject 对话框,创建一标准DataWindow类用户对象
根据需要对控件增加功能,并保存到用户库中
在程序中调用函数:openuserobject(userobjectvar{,x,y})
窗口关闭前清除对象:closeuserobject()
网友:lingyun Email: marine@yanan.xmu.edu.cn
在程序运行过程中,要动态的改变DataWindow控件窗口中内容的可用多种方法实现:
1.创建多个DataWindow对象,在程序运行时,通过一按钮控件的Click事件来改变DataWindow对象
if dw_control.dataobject=d_object1 then
dw_control.dataobject=d_object2
else
dw_control.dataobject=d_object1
end if
dw_control.settransobject(SQLCA)
dw_control.retrieve()
2.使用setsqlselect函数
dw_control.setsqlselect("select * from table1")
dw_control.retrieve()
3.使用modify函数
dw_control.modify("datawinodw.table.select='select * from table1'")
4.使用create(syntax{,errorbuffer})函数
syntax有三种方法实现:
调用libraryexport()
调用syntaxfromsql()
用户自定义
如:
string ls_select,ls_present
ls_select="select * from table1 where name like 'l%'"
ls_present="style(type=form)"
ls_syntax=SQLCA.syntaxfromsql(ls_select,ls_present)
dw_control.create(ls_syntax)
dw_control.settransobject(SQLCA)
dw_control.retrieve()
5.或者自己动态创建一个DataWindow控件
打开new user boject 对话框,创建一标准DataWindow类用户对象
根据需要对控件增加功能,并保存到用户库中
在程序中调用函数:openuserobject(userobjectvar{,x,y})
窗口关闭前清除对象:closeuserobject()
- 动态改变DataWindow控件窗口中内容的几种实现方法
- 动态改变DataWindow控件窗口中内容的几种实现方法
- 动态改变DataWindow控件窗口中内容的几种实现方法
- 动态改变DataWindow控件窗口中内容的几种实现方法
- PowerBuilder 中怎么样动态改变datawindow的sql语句
- PB 数据窗口(DataWindow)中数据传递的方法
- vc窗口标题改变的几种方法
- MFC改变窗口风格的几种方法
- Android中动态改变控件的大小的一种方法
- 程序运行过程中动态改变控件大小的方法
- Delphi 动态创建窗口的几种方法
- c# 动态改变控件大小的方法
- android 动态改变控件大小的方法
- PB数据窗口控件-datawindow
- PB数据窗口控件-datawindow
- 实现发送邮件动态html内容的几种思路
- 实现发送邮件动态html内容的几种思路
- 实现发送邮件动态html内容的几种思路
- 一行简单的HTML和CSS代码就可让IE 6崩溃
- 电讯营业分析报表系统--菜单图示[JPG5张]
- 指针的文章
- 8月1号到5号的心得
- 2007-8-7
- 动态改变DataWindow控件窗口中内容的几种实现方法
- ASP.NET2.0主题皮肤
- SQL远程数据同步与数据导入的常用方法[原创]
- Loop, data, and MapReduce
- spring 申明事务中的session的打开与关闭
- CB编程中动态更改自定义打印纸张
- 对象转型的小例子
- STL 详解
- DataGrid操作大全和精华