Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Fri Nov 16, 2018 6:10 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Edit a recordset with more than one table's data?
PostPosted: Wed Sep 12, 2012 8:29 am 
Offline

Joined: Tue Apr 17, 2007 9:19 pm
Posts: 437
Is it possible to edit and update more than one table if they are both included in a recordset?

I've been trying this with no luck.


Top
 Profile  
Reply with quote  
 Post subject: Re: Edit a recordset with more than one table's data?
PostPosted: Wed Sep 12, 2012 9:13 am 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
No since there's no way to uniquely identify the rows in use from the underlying tables - this is analogous to trying to edit a view which mostly doesn't work in any db except under some very stringent conditions.

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: Edit a recordset with more than one table's data?
PostPosted: Wed Sep 12, 2012 10:05 am 
Offline
User avatar

Joined: Fri Nov 10, 2006 4:10 pm
Posts: 1855
Location: Michigan, USA
npalardy wrote:
No since there's no way to uniquely identify the rows in use from the underlying tables - this is analogous to trying to edit a view which mostly doesn't work in any db except under some very stringent conditions.

Depending on which DB you're using, you can add a rule function for a view, which receives the new recordset and applies it to the corresponding tables accordingly. Generally, however, this is not advised. Personally, I have DatabaseTable and DatabaseView classes, and subclass each Table/View accordingly. I use the Tables purely for insertion, and the Views for reading — this also has the benefit of allowing me to adjust a view to still work in the case that the table(s) change.

But to answer your question straight: No, edit one table at a time.

Hope this helps. :)

_________________
Windows 8 x64
Windows XP Pro SP3
Ubuntu 11.04 via Virtual Box
RS Enterprise 2012r1.1

Programming Tutorials & Free Projects: http://www.JasonTheAdams.com
"Christianity has not been tried and found wanting; it has been found difficult and not tried." - G.K. Chesterton


Top
 Profile  
Reply with quote  
 Post subject: Re: Edit a recordset with more than one table's data?
PostPosted: Wed Sep 12, 2012 10:18 am 
Offline

Joined: Tue Apr 17, 2007 9:19 pm
Posts: 437
Thank you for the quick responses. I guess I had already discovered this for myself by creating a separate recordset (with one table in it) for editing and it worked fine, but I do appreciate the confirmation.


Top
 Profile  
Reply with quote  
 Post subject: Re: Edit a recordset with more than one table's data?
PostPosted: Wed Sep 12, 2012 6:42 pm 
Offline
User avatar

Joined: Wed Sep 20, 2006 5:12 pm
Posts: 680
Location: Puerto Rico
Yes using update statement with a join table

_________________
Thanks for any contribution and God blesses all (I start Using RS in 10/12/2010)
Mac Mini with Lion v10.7.5 and Real Studio 2012r1 Pro And Windows 7 RS2012r1 Personal and Linux RS2012r1 Personal Register user
my Hobbies R/C Turbines Jets Models


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group