前往Shuct.Net首页

Shudepb PB反编译专家长时间以来,为业内同类软件事实上的唯一选择.细节,彰显专业.态度,决定品质.

关于PowerBuilder的搜索

PowerBuilder中filter函数怎么用啊,请高手解释一下,具体参数解释,和返回值解释_百度知道 百度首页 | 手机知道 | 登录 注册 新闻 网页 贴吧 知道 音乐 图片 视频 地图 百科 文库 经验 我要提问 首页 分类 公社 财富商城 知道团队 管 理 员 认证用户 知道之星 知道活动 问医生 问律师 问作业 经验 买什么 个人中心 手机知道 百度知道 >电脑/网络 >软件开发 >数据库DB PowerBuilder中filter函数怎么用啊,请高手解释一下,具体参数解释,和返回值解释 2011-03-17 12:48 0722riquanshi | 分类:数据库DB 扫描二维码下载 下载知道APP10分钟有问必答! 建议:可使用微信的“扫一扫”功能扫描下载 分享到: 2011-03-19 18:03 提问者采纳 filter是过滤的函数。首先要用setfilter函数设置过滤条件,才能用filter函数执行。setfilter函数的参数是字符型,里面的字符串用于设置过滤的条件,例如dw_control.setfilter("emp_name = 'Tom'"),设置好过滤条件后,dw_control.filter()。两个函数配合使用。至于返回值,返回值为整型,如果返回1,表示此函数成功执行,如果返回-1表示执行过程中出现错误。 提问者评价 谢谢啦 评论 | hit_lubin | 十二级 采纳率60% 擅长: 数据库DB 其他编程语言 足球 其他类似问题 2011-12-12 2006-11-28 2 2009-07-17 7 2007-11-30 9 2010-12-18 1 更多相关问题>> 按默认排序 | 按时间排序 其他3条回答 2011-03-17 17:08 g2462477 | 四级 filter..显示满足过滤条件的行.. 其参数允许使用like(模糊查询).. '%'.这个符号表示多个字符.. 例如你想查找列名为'商品编码'.. 你在参数里可以写成%编码.. 它会把所有带'编码'俩字的字段都显示出来. '_'代表一个字符..例如你想找'商品简称'.但你不确定是简称还是名称.你可以把条件写成'商品_称'.在使用的时候先用:dw_1.setfilter('过滤条件')dw_1.filter()filter只是过滤.而在写过滤的条件时用setfilter这个来设置过滤条件希望以上对你有帮助.. 评论 | 2011-03-17 13:07 genta666666 | 二级 Description Displays rows in a DataWindow that pass the current filter criteria. Rows that do not meet the filter criteria are moved to the filter buffer.Controls DataWindow controls, DataStore objects, and child DataWindowsSyntax dwcontrol.Filter ( )Argument Descriptiondwcontrol The name of the DataWindow control, DataStore, or child DataWindow that you want to filterReturn value Integer. Returns 1 if it succeeds and -1 if an error occurs. If dwcontrol is NULL, Filter returns NULL. The return value is usually not used.Usage Filter uses the current filter criteria for the DataWindow. To change the filter criteria, use the SetFilter function. The SetFilter function is equivalent to using the Filter command on the Rows menu of the DataWindow painter. If you do not call SetFilter to set the filter before you call Filter, Filter uses the filter specified in the DataWindow object definition.When the Retrieve function retrieves data for the DataWindow, PowerBuilder applies the filter that was defined for the DataWindow object, if any. You only need to call Filter after you change the filter criteria with SetFilter or if the data has changed because of processing or user input.When the Retrieve As Needed option is set, the Filter function cancels its effect. Filter causes all rows to be retrieved and then it applies the filter.Filter has no effect on the DataWindows in a composite report.Filtering and groups When you filter a DataWindow with groups, you may need to call GroupCalc after you call Filter.For information on removing the filter or letting the user specify a filter expression, see SetFilter.This statement displays rows in dw_Employee based on its current filter criteria:dw_Employee.SetRedraw(false)dw_Employee.Filter()dw_Employee.SetRedraw(true) 评论 | 2013-04-10 08:40 shanjiells | 一级 如果希望对DataWindow内的数据进行过滤而不重新从数据库中检索数据,可以使用SetFilter()和Filter()函数。它们一起完成对数据的过滤功能。其中SetFilter()函数用来设置过滤条件,Filter()函数用于对DataWindow进行过滤。 语法格式: dw_control.SetFiter(expression) dw_control.Fiter() 其中expression是一个字符串,表示过滤的条件,它实际是一个逻辑表达式。 例: dw_1.SetFilter("id>\'003\' AND name like\'王%\'") dw_1.Filter() 这两个函数都是返回1表示成功,返回-1表示失败。 评论 | PowerBuilder的相关知识 2012-05-12 PowerBuilder中函数查找 2 2010-07-24 PowerBuilder的函数问题。 1 2010-07-14 PowerBuilder中函数 用于判断变量是否为空 1 2009-04-07 PowerBuilder中的关于函数Setfilter()问题 4 2011-01-13 PowerBuilder 的时间函数,如何获取当前系统时间 1 更多关于PowerBuilder的问题>> 等待您来回答 0回答 我12月26号用post canada 给国内寄了一个包裹,用航运,但到现在都... 0回答 什么是混合编班考试 2回答 安卓qq2013怎么批量删除说说 0回答 10 SQL2012等待数据库引擎恢复句柄失败-WIN7的64位系统,安装文件是SQ... 0回答 5 JSP连接sqlserver问题,请教,谢谢! 1回答 5 用JQUERY POST的方法如何实现登录,我写了一个,请高手指教哪里错了... 2回答 求一个60级的qq 0回答 10 求大神指导一个SQL语句 2回答 30 asp.net用户代码为处理 sqlexception 用户 'IQ0732-PC' 登... 1回答 www.chinapost.com.cnNE02484537842到哪了 1回答 QQ气泡这个怎么弄出来,求截图 1回答 5 用phpmyadmin导出数据库并生成文件*.sql 文件中中文显示为很多‘?... 0回答 sqlserver2008 字符分割的字段怎么分成列 1回答 www.chinapost.com.cn请查询中国交通信用卡NE36456714531卡寄往哪里 0回答 在qq飞车获得永久T2变形车光明骑士的办法了 更多等待您来回答的问题>> 知道日报 往期回顾 登录 还没有百度账号?立即注册 1 2 3 精彩知识在知道 知道君在微博、微信等你! 2014春节必备的14个锦囊 不得不知的浏览器安全隐患! 爱知道,解答你的青春期困惑 帮助 | 意见反馈 | 投诉举报 | 知道协议 | 加入我们 ©2014 Baidu 使用百度前必读 | 百度知道开放平台