动态改变DataWindow控件窗口中内容的几种实现方法
来源:互联网 发布:办公软件好学吗 编辑:程序博客网 时间:2024/05/22 04:57
动态改变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内容的几种思路
- AJAX 前进后退刷新问题
- sed 命令详解
- [转]httpd.conf详尽中文解释,如何配置设置,非常详细
- 新版开张,来个总结PHP框架的总结。
- 一个TAB效果(截图)
- 动态改变DataWindow控件窗口中内容的几种实现方法
- [转]centos下配置apache+php+mysql
- 别以为进了大学就是天堂——2-学会学习
- sql 语句 转换函数
- C#巧截字符串的数字
- 初学T-SQL笔记之 ON PRIMARY
- The components of a formal use case presentation (from: http://www.ibm.com/developerworks/library/co-design5.html)
- 辟邪剑谱之vs2005
- linux下FTP命令详解