Mateen
asked on
Datawindow modify expression, length property.
I have come across a very strange limitation of pb7 (maybe I am wrong).
To be very brief I have a datawindow control dw_1 with external dataobject d_external.
d_external has one column s_column_1 whoose length is 11. I want to change that length to 20 at runtime.
I am successfully doing these:
s_expr_width = "s_column_1.width="+string (a_stparm. first_col_ width*30)
s_expr_edit_limit = "s_column_1.edit.limit="+s tring(a_st parm.first _col_width ) //first_col_width has got value 20
ret_value=dw_1.Modify(s_ex pr_width)
ret_value=dw_1.Modify(s_ex pr_edit_li mit)
I mean, I am able to modify width and edit limit propery but I don't know what is the name of length propetry.
Dear expert, I would be able to give any feedback tomorrow.(Please forgive)
To be very brief I have a datawindow control dw_1 with external dataobject d_external.
d_external has one column s_column_1 whoose length is 11. I want to change that length to 20 at runtime.
I am successfully doing these:
s_expr_width = "s_column_1.width="+string
s_expr_edit_limit = "s_column_1.edit.limit="+s
ret_value=dw_1.Modify(s_ex
ret_value=dw_1.Modify(s_ex
I mean, I am able to modify width and edit limit propery but I don't know what is the name of length propetry.
Dear expert, I would be able to give any feedback tomorrow.(Please forgive)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
hi mateen,
type = char(11) as posted by u...
here char(11) is the database column length and datatype....
there is no way by which this can be changed by PB coz this is only the database column specification which the datawindow is showing...
to have a change of length u need to do necessary alteration in ur backend... alter the length of ur column to 20 and then only can the datawindow show the change of length....
do ask for more assistance...
Cheers,
Rosh
type = char(11) as posted by u...
here char(11) is the database column length and datatype....
there is no way by which this can be changed by PB coz this is only the database column specification which the datawindow is showing...
to have a change of length u need to do necessary alteration in ur backend... alter the length of ur column to 20 and then only can the datawindow show the change of length....
do ask for more assistance...
Cheers,
Rosh
hi,
oops i'm sorry... u are refering to an external dw... well then there's no talk about altering the backend...sorry..
i don't think its possible to change the column length dynamically unless manually doing it in the case of external dw...
Rosh
oops i'm sorry... u are refering to an external dw... well then there's no talk about altering the backend...sorry..
i don't think its possible to change the column length dynamically unless manually doing it in the case of external dw...
Rosh
ASKER
Hi vikas:
Agreed that create method is the only option.
In the open event doing this
string ls_syntax
long position,RETVALUE
ls_syntax=dw_1.object.data window.syn tax
messagebox('ORIGINAL SYNTAX',ls_syntax)
position=pos(ls_syntax,'ch ar(11)')
ls_syntax=replace(ls_synta x,position ,8,'char(2 0)')
messagebox('CHANGED SYNTAX',ls_syntax)
ls_syntax=dw_1.object.data window.syn tax
RETVALUE=dw_1.create(ls_sy ntax)
MESSAGEBOX('SUCCESS/FAILUR E OF CREATE',STRING(RETVALUE))
dw_1.settransobject(sqlca)
ls_syntax=dw_1.object.data window.syn tax
messagebox('NEW SYNTAX',ls_syntax)
retvalue shows 1 meaning successful creation. But ls_syntax=dw_1.object.data window.syn tax after recreation is showing old values.
Agreed that create method is the only option.
In the open event doing this
string ls_syntax
long position,RETVALUE
ls_syntax=dw_1.object.data
messagebox('ORIGINAL SYNTAX',ls_syntax)
position=pos(ls_syntax,'ch
ls_syntax=replace(ls_synta
messagebox('CHANGED SYNTAX',ls_syntax)
ls_syntax=dw_1.object.data
RETVALUE=dw_1.create(ls_sy
MESSAGEBOX('SUCCESS/FAILUR
dw_1.settransobject(sqlca)
ls_syntax=dw_1.object.data
messagebox('NEW SYNTAX',ls_syntax)
retvalue shows 1 meaning successful creation. But ls_syntax=dw_1.object.data
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
U r right rosh.
ASKER
Hi vikas:
If I export d_external then a line from d_external.srd is:
table(column=(type=char(11
I want to change char(11) with char(20). I am wondering why this facility is not provided in modify properties.