-
Richard Hartman
- PowerBuilder
- Wednesday, 3 June 2026 12:31 AM UTC
Ok, this may be an odd one. Or maybe it's quite simple. I really don't know.
I have a datawindow and the query inside has a union. The same table exists in two separate databases on the same server. So the query source looks like this:
SELECT vvc.application_name ,
vvc.current_version ,
vvc.minimum_version ,
vvc.lock_ind
FROM vbus.dbo.version_control AS vvc
WHERE ( vvc.application_name = :application )
union
SELECT svc.application_name ,
svc.current_version ,
svc.minimum_version ,
svc.lock_ind
FROM satellite.dbo.version_control AS svc
WHERE ( svc.application_name = :application )
So ... the question is ... what happens with an InsertRow() ? Or an Update() ? Should I create two datawindows from this and only use one at a time?
The context here, btw, is attempting to upload the binaries of the applications so that the users can download updates. For the application named "SAM" the right database is "satellite" and for the application named "VBUS" the right database is "VBUS". There is a form (window) where the application name is selected with a combobox.
Bear in mind that I inherited this code. The original was built against a sybase ase server, and we are porting it to microsoft sql server ... if that makes any difference in how the datawindow would treat a union'd query for these purposes.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.