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!

To update a datawindow having multiple table

Status
Not open for further replies.

jancypaul

Programmer
Aug 3, 2007
20
GB
Dear all expertise Please help

I am using PB11.

I created a datawindow using two table with the following data source

Select salary.id, salary.amount,emp.code,emp.name
from emp, salary where emp.id = salary.id
and emp.desig = 'mgr' and emp.rank ='A'

In the above SQL, I given the where condition by SetSQLSelect dynamic sql

Also I given the update properties in that data window
as follows

1. Key Column
2. Primary Key is salary.id

the column to be updated salary.amount

When I am trying to modify the salary.amount the following error message is coming

"datawindow dosnot have update capability" . But already I given the update settings.

But there is no problem occure when I am passing the where condition as retreival argument for the datawindow

Please help me to update the datawindow column salary.amount having dynamic sql and multiple table.

Regards

Jan




 
I'm assuming the "Allow Updates" checkbox is checked and the table to update is selected? (under the Rows | Update Properties menu in the DataWindow painter)
 

Dear theklOwn

Yes I checked already 'Allow update' option and the table selected 'salary' and the primary key given salary.id
 
Hi,

can you post here the source code of your dw and the tabledescription so I can check it in pb?
 
Thank you bernds44

Please help me..

I am giving another data window as example having same case

Following is the data window source code

SELECT sys_tblholrequest.id,
sys_tblholrequest.username,
sys_tblholrequest.managerid,
sys_tblholrequest.datefrom,
sys_tblholrequest.dateto,
sys_tblholrequest.approved
FROM sys_tblfitter INNER JOIN sys_tblholrequest ON
sys_tblfitter.recordid = sys_tblholrequest.employeeid
Where sys_tblholrequest.approved = 'N'

Also I am giving a dynamic sql as follows

l_str_setsql += "~n And sys_tblfitter.emailid = '"+l_str_mail+"'"

l_str_getsql = dw_main.getsqlselect()
l_str_sql = l_str_getsql + l_str_setsql
dw_main.settransobject( sqlca)
dw_main.setsqlselect( l_str_sql)
dw_main.settransobject( sqlca)
dw_main.retrieve( )


tblholrequest.id autonumber primary key
sys_tblholrequest.username varchar2
sys_tblholrequest.datefrom datetime
sys_tblholrequest.dateto datetime
sys_tblholrequest.approved char(1)

I want to update sys_tblholrequest.approved column as 'Y'

using dw_main.update()







 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top