Database 版 (精华区)
发信人: Hp_He@bbs.ustc.edu.cn (steven), 信区: cndatabase
标 题: Re: PB40中数据窗口属性设定救助
发信站: 中国科大BBS站 (Wed May 21 18:25:30 1997)
转信站: Lilac!ustcnews!ustcnews!ustcbbs
> ==> major.bbs@bbs.whnet.edu.cn(虾米) 说道:
> 我在一程序中动态的改变了数据窗口的SELECT语句,但在RETRIEVE时总报错,
>
the reason is the string type variable;
in pb , if the column type is char or varchar,
you should refer it's value as in ' ',but not
in " ". so,your program may be modified as following:
部分程序代码如下:
> ls_clause_old=dw_1.describe("datawindow.table.select")
> ls_clause_where="WHERE ( jxjw_tab.jxjw_grade=" + &
> string(str_jxrw_1.grade)+" ) and" + &
> "(jxrw_tab.jxrw_kind ='" + &
> str_jxrw_1.kind+"') and" + &
> "( jxrw_tab.jxrw_term =" + &
> string(str_jxrw_1.term)+") and" + &
> "(trim(jxrw_tab.jxrw_special)='" + &
> str_jxrw_1.major+"')"
> ls_clause_new=ls_clause_old+ls_clause_where
> rc=dw_1.modify("datawindow.table.select='"+ls_clause_new+"'")
> if rc<>"" then
> messagebox("",rc)
> end if
--
※ 来源: 中国科大BBS站 [bbs.ustc.edu.cn]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:3.198毫秒