Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DatawindowChild Reset?

Status
Not open for further replies.

kaul125

Programmer
Jan 29, 2002
87
US
I have a datawindow that has a column with a DDDW. The window that has this datawindow also has a tab object. Certain tabs will use this datawindow/DDDW as an argument to retrieve data for that tab.

As I select tabs that use this datawindow, if I have previously selected an item from the previous tab that uses this columnn, the same key value shows up on the next tab I select. Each tab that utilizes this DW will have a different result set. So, I need to clear out the datawindow/DDDW prior to retrieving for the new tab. I do a dwo.Reset() but this does not work.

Does anyone have any suggestions on how to clear out a child datawindow prior to a retrieve?
 
You need to use the getchild() function. This provides a reference to a child DataWindow or to a report in a composite DataWindow, which you can use in DataWindow functions to manipulate that DataWindow or report.

dwcontrol.GetChild ( name, dwchildvariable )

Where dwcontrol equals the name of the DataWindow control or DataStore that contains the child DataWindow or report, name being the string that names the column containing the child DataWindow or that names the report in the composite DataWindow and dwchildvariable being a variable of type DataWindowChild in which you want to store the reference to the child DataWindow

An example would look as follows:

DataWindowChild ldwc_state_child

dw_1.GetChild('emp_state', ldwc_state_child)
ldwc_state_child.SetTransObject(SQLCA)
ldwc_state_child.reset()

That should solve your problem.

Kind regards

Tentacle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top