Home » Developer & Programmer » Forms » Problem with adding and updating
Problem with adding and updating [message #641141] Tue, 11 August 2015 03:24 Go to next message
amjad_alahdal
Messages: 102
Registered: October 2013
Location: Saudi Arabia
Senior Member
Hello guys, I have made a from I used a select statement in the block property the Query Data Source Name :

( select Q.ROWID, Q.YEAR_ID , Q.ID_NO, Q.Grade, Q.GRADE_NAME, S.AR_NAME from student_table Q , REGISTRATION_TABLE S where S.ID_NO = Q.ID_NO AND Q.YEAR_ID = 1436 AND SUBJECT_ID = 16 ) student_table


when I try to update the table it says you can't update or insert
Re: Problem with adding and updating [message #641147 is a reply to message #641141] Tue, 11 August 2015 03:35 Go to previous messageGo to next message
cookiemonster
Messages: 13894
Registered: September 2008
Location: Rainy Manchester
Senior Member
Nope, you can't. From queries as data sources aren't updatable.
Is the form supposed to insert/update both tables or just one?
Re: Problem with adding and updating [message #641155 is a reply to message #641147] Tue, 11 August 2015 05:14 Go to previous messageGo to next message
amjad_alahdal
Messages: 102
Registered: October 2013
Location: Saudi Arabia
Senior Member
just one table. So in this case, what shall I do ?

[Updated on: Tue, 11 August 2015 05:20]

Report message to a moderator

Re: Problem with adding and updating [message #641161 is a reply to message #641155] Tue, 11 August 2015 06:23 Go to previous messageGo to next message
cookiemonster
Messages: 13894
Registered: September 2008
Location: Rainy Manchester
Senior Member
which one?
Re: Problem with adding and updating [message #641198 is a reply to message #641161] Tue, 11 August 2015 15:10 Go to previous messageGo to next message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
Quote:
just one table. So in this case, what shall I do ?

Write your own UPDATE SQL and put it in the On-Update block trigger.

Craig...
Re: Problem with adding and updating [message #641218 is a reply to message #641198] Wed, 12 August 2015 00:20 Go to previous messageGo to next message
amjad_alahdal
Messages: 102
Registered: October 2013
Location: Saudi Arabia
Senior Member
cookiemonster , Student table is updated
Re: Problem with adding and updating [message #641231 is a reply to message #641218] Wed, 12 August 2015 02:34 Go to previous messageGo to next message
cookiemonster
Messages: 13894
Registered: September 2008
Location: Rainy Manchester
Senior Member
So base the block on student, make a non-database display item for ar_name and populate it in post-query and the appropriate when-validate-item with a select statement.
Re: Problem with adding and updating [message #664489 is a reply to message #641231] Thu, 20 July 2017 01:53 Go to previous message
amjad_alahdal
Messages: 102
Registered: October 2013
Location: Saudi Arabia
Senior Member
Thank You. Problem Solved.
Previous Topic: Error ORA-00600
Next Topic: Server and Stations Problem
Goto Forum:
  


Current Time: Wed Dec 01 21:54:16 CST 2021