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!

Linkage and updates

Status
Not open for further replies.

Annelize

Programmer
Dec 17, 2004
45
GB
Hi guys

I'm hoping somebody could shed some light my following problem.

- I have master / detail datawindows set up through linkage.
- I made both the master and detail updatable through Rows / update properties.
- I can preview the dw, make changes and saves it without a problem.

But:
- I’ll run the application and make changes in my child.
- Upon saving I call pfc_Save in my parent
- Then I get an error saying that the Datawindow does not have update capability.

Then
- I took the linkage OFF and made changes to the master.
- It worked perfectly without error.

So this tells me that the linkage is causing the problem.
Here are the code, setting up my linkage

Code:
//enable the linkage service for the master / detail datawindow
//master
dw_master.of_setlinkage(TRUE)
dw_master.of_setrowmanager(TRUE)

dw_master.inv_linkage.of_setupdatestyle(1)  //TOPDOWN
dw_master.inv_linkage.of_setupdateonrowchange(TRUE)
dw_master.inv_linkage.of_setconfirmonrowchange(TRUE)
dw_master.inv_linkage.of_setconfirmondelete(TRUE)

dw_master.inv_linkage.of_settransobject( SQLCA )

//detail
dw_detail.of_setlinkage(TRUE)

//link to the master and register related columns
dw_detail.inv_linkage.of_Setmaster( dw_sec_roles_master)
dw_detail.inv_linkage.of_Register("ROLE_ID","ROLE_ID")

//establish the action taken in the detail when row focus changes in the master
dw_detail.inv_linkage.of_setStyle(dw_detail.inv_linkage.retrieve)

dw_master.of_setupdateable( TRUE)
dw_detail.of_setupdateable( TRUE)

Can you think of anything that I might be missing?
Thanks in advance
Annelize
 
Are you using the of_save method on the linkage service?
(dw.inv_linkage.of_save(0,TRUE) or similar?

Matt

"Nature forges everything on the anvil of time
 
No, I call the of_Save method of the window. That uses the of_Save() of w_master.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top