Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dataobject and Datawindowchild

366 views
Skip to first unread message

Don Wood

unread,
Jul 17, 2000, 3:00:00 AM7/17/00
to
Is there a way I can dynamically change the dataobject of a
dropdowndatawindow? I have the following in script:

datawindowchild ldwc_phase_dw

this.GetChild( 'phs_id', ldwc_phase_dw )
If is_status = 'E' Then
ldwc_phase_dw.DataObject = 'dddw_phase_type_lookup4'
Else
ldwc_phase_dw.DataObject = 'dddw_phase_type_lookup3'
End if
ldwc_phase_dw.SetTransObject( SQLCA )

To which I get the following error: Incompatible property dataobject for
type datawindowchild


Bruce Armstrong [TeamSybase]

unread,
Jul 17, 2000, 3:00:00 AM7/17/00
to
My bad. The references to change the edit sytle should use the column name,
not the dwchild variable name:

this.DataWindow.Object.phs_id.Name = 'dddw_phase_type_lookup4'

And, if needed:

this.DataWindow.Object.phs_id.DataColumn = 'columnname'
this.DataWindow.Object.phs_id.DisplayColumn = 'columnname'
etc.

On Mon, 17 Jul 2000 10:57:12 -0400,
in powersoft.public.powerbuilder.datawindow

Bruce Armstrong [TeamSybase]
mailto:Bruce.A...@teamsybase.com

Preach the gospel at all times. If necessary, use words. [Francis of Assisi]
http://www.kidbrothers.org | http://www.fccwc.org
http://www.harvest.org/knowgod/index.htm | http://www.needhim.org

-----------== Posted via the PFCGuide Web Newsreader ==----------
http://www.pfcguide.com/_newsgroups/group_list.asp

Bruce Armstrong [TeamSybase]

unread,
Jul 17, 2000, 3:00:00 AM7/17/00
to
You change the dddw edit style to do this:

ldwc_phase_dw.Name = 'dddw_phase_type_lookup4'

And, if needed:

ldwc_phase_dw.DataColumn = 'columnname'
ldwc_phase_dw.DisplayColumn = 'columnname'

Starry

unread,
Dec 1, 2000, 3:00:00 AM12/1/00
to
Deeply sorry,

Why can't use these ways in PB7.0 ??
Please help me. Thanks !!

Best regards,
Starry

"Bruce Armstrong [TeamSybase]" wrote:

> My bad. The references to change the edit sytle should use the column name,
> not the dwchild variable name:
>

> this.DataWindow.Object.phs_id.Name = 'dddw_phase_type_lookup4'
>
> And, if needed:
>
> this.DataWindow.Object.phs_id.DataColumn = 'columnname'
> this.DataWindow.Object.phs_id.DisplayColumn = 'columnname'

Simon Caldwell

unread,
Dec 1, 2000, 3:00:00 AM12/1/00
to
These methods *do* work in PB7. There must be something wrong with your
code, maybe you could post an extract?

S.

--
Simon Caldwell
Get Real Systems Ltd
Holtby Manor, Stamford Bridge Road, York, YO19 5LL
Tel 01904 481999 Fax 01904 481666
Visit us at www.getrealsystems.com

Specialists in e-Procurement and supply chain technology


"Starry" <sta...@kcg.url.com.tw> wrote in message
news:3A27A110...@kcg.url.com.tw...

Starry

unread,
Dec 4, 2000, 3:00:00 AM12/4/00
to
Thanks!! Please refer to following code
=================================================
DataWindowChild ldwc_status

If dwo.name = 'as_type' Then
IF dw_query.GetChild('as_status', ldwc_status) = -1 THEN
f_msg("The child DataWindow reference failed")
return
End If
CHOOSE CASE data
Case 'C'
ldwc_status.Name = "d_ddl_costatus"
CASE 'M'
ldwc_status.Name = "d_ddl_mfgstatus"
CASE 'H'
ldwc_status.Name = "d_ddl_helpstatus"
END CHOOSE
ldwc_status.SetTransObject(SQLCA)
End If
================================================
C0019: Incompatible property name for type datawindowchild.
this.DataWindow.Object.as_status.Name = 'd_ddl_costatus' = the same error.

I use PB7.0 build 6012 with PFC & PFE in NT4.0
Please help me. Thanks very very much !!

Best Regards,
Starry

Simon Caldwell

unread,
Dec 4, 2000, 3:00:00 AM12/4/00
to
That should be:

CHOOSE CASE data
Case 'C'
dw_query.object.as_status.dddw.Name = "d_ddl_costatus"
CASE 'M'
dw_query.object.as_status.dddw.Name = "d_ddl_mfgstatus"
CASE 'H'
dw_query.object.as_status.dddw.Name = "d_ddl_helpstatus"
END CHOOSE
you may then need to set the dddw.DisplayColumn and DataColumn attributes
too.

Have a look at the DWSyntax utility (File -> New -> Tool -> DataWindow
Syntax), this gives the correct syntax for all Describe() and Modify()
commands.

S.
--
Simon Caldwell
Get Real Systems Ltd
Holtby Manor, Stamford Bridge Road, York, YO19 5LL
Tel 01904 481999 Fax 01904 481666
Visit us at www.getrealsystems.com

Specialists in e-Procurement and supply chain technology


"Starry" <sta...@kcg.url.com.tw> wrote in message

news:3A2B4BB2...@kcg.url.com.tw...

Starry

unread,
Dec 7, 2000, 12:57:32 AM12/7/00
to
Thanks for your help a lot !!
0 new messages