RE: [DUG] Self Freeing

2004-03-18 Thread Stephen Bertram
Title: Message AFAIK there is no problem executing Self.Free on the following conditions: 1. The objectdoes not have an owner 2. The Self.Free statement is in a static method 3. The object is not later refered to from the generating program - either the object is not assigned to a

RE: [DUG] OnExit

2004-03-18 Thread Stephen Bertram
Don't you have a problem returning the result to the calling program if you free the component on exit? Stephen -Original Message-From: Paul Mckenzie [mailto:[EMAIL PROTECTED]Sent: Friday, 19 March 2004 8:23 a.m.To: NZ Borland Developers Group - Delphi ListSubject: Re:

Re: [DUG] OnExit

2004-03-18 Thread Paul Mckenzie
OnExit - all the processing has been done (possibly no processing done or required) - no result to return... RegardsPaul McKenzieAnalyst ProgrammerSMSS Ltd. - Original Message - From: Stephen Bertram To: NZ Borland Developers Group - Delphi List Sent: Friday, March

[DUG] Programming in Delphi, but have a SQL question

2004-03-18 Thread Eric Tishler
Title: Message I am trying to implement a new report in Delphi, but I am having problems with the query. I know this is not a straight Delphi question, but I was hoping someone here could steer me in the right direction. I have two tables with transactions. One table contains ALL

RE: [DUG] Programming in Delphi, but have a SQL question

2004-03-18 Thread Chris Milham
Title: Message How about a sub-select eg. Select * from sub_trans_table where trans_pk not in (select trans_pk from all_trans_table) HTH Chris -- Chris Milham BSc BD Senior Software Engineer EVP Holdings Ltd DDI: + 64 9 526 2423 Fax: + 64 9 571 0017 www.evp.cc The information

Re: [DUG] Programming in Delphi, but have a SQL question

2004-03-18 Thread Paul Mckenzie
Title: Message This should do it... select * from Master MTwhere not exists (select ST.ID from Sub ST where ST.ID = MT.ID) HTH RegardsPaul McKenzieAnalyst ProgrammerSMSS Ltd. - Original Message - From: Eric Tishler To: NZ Borland Developers Group - Delphi List

RE: [DUG] Self Freeing

2004-03-18 Thread Stephen Bertram
Title: Message My understanding is: 1. If a component has an ownerthen theowner will try to free it during its destroy method leading to an access violation if it is freed elsewhere. So if you are explicitly freeing it create it with Create(Nil). N.B. for newcomers - this is totally

RE: [DUG] Programming in Delphi, but have a SQL question

2004-03-18 Thread Paul Ritchie
I would tend to use an outer join where the JOINed master column is NULL eg SELECT Subset.* FROM Subset LEFT OUTER JOIN Master ON Subset.ID = Master.ID WHERE Master.ID IS NULL cheers, Paul. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Eric Tishler

RE: [DUG] Programming in Delphi, but have a SQL question

2004-03-18 Thread Stephen Bertram
Title: Message This works, but I think you have the check the wrong way round Paul. Eric wants to know the entries in the Sub table with no matching Master entry. Notethat if the tables are large the NOT IN is very inefficient. I had a case where this type of query was running for more

Re: [DUG] Programming in Delphi, but have a SQL question

2004-03-18 Thread Robert martin
Title: Message SELECT * FROM Subset LEFT JOIN Master ON Master.Pk = Subset.Pk WHERE Master.PK IS NULL; It might be a right join, I always get it mixed up. Rob MartinSoftware Engineerphone 03 377 0495fax 03 377 0496 web www.chreos.com - Original Message - From: Eric

Re: [DUG] Programming in Delphi, but have a SQL question

2004-03-18 Thread Robert martin
Agreed. I think using a JOIN method is faster than doing a sub select (might be significant for a large data set). Rob Martin Software Engineer phone 03 377 0495 fax 03 377 0496 web www.chreos.com - Original Message - From: Paul Ritchie [EMAIL PROTECTED] To: 'NZ Borland Developers

Re: [DUG] Self Freeing

2004-03-18 Thread Dennis Chuah
(1) is incorrect. When a component is freed, its owner is notified and the component is removed from the owner's list of child components. Having said that, if your code will be freeing the component explicitly, then there is no reason to assign the component an owner. Re, the following line

RE: [DUG] Programming in Delphi, but have a SQL question

2004-03-18 Thread Eric Tishler
I will have to consider trying the JOIN method, but I got it working with NOT EXISTS. For some reason my dialect of SQL did not lie NOT IN. Thanks for everyone's help ... Eric Eric Tishler Software Architect Resolute Partners, LLC Phone: 203.271.1122 Fax: 203.271.1460 [EMAIL PROTECTED]

RE: [DUG] Self Freeing

2004-03-18 Thread Conor.Boyd
Title: Message Yeah, I would be hesitant too. WRT forms however, what you can safely do is call Release (which is introduced on TCustomForm). This will free the form, but only when all event handlers, etc. have finished processing. HTH, Conor From: Paul Mckenzie [mailto:[EMAIL

RE: [DUG] Self Freeing

2004-03-18 Thread James Sugrue
You bastard. I've got that song in my head now and can't get rid of it. Bloody Howard Morrison version too. Argghhh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stephen Barker Sent: Friday, 19 March 2004 12:36 p.m. To: 'NZ Borland Developers

RE: [DUG] Self Freeing

2004-03-18 Thread Conor.Boyd
Nice. ;-) You can tell it's Friday... -Original Message- From: Stephen Barker [mailto:[EMAIL PROTECTED] WRT forms however, what you can safely do is call Release (which is introduced on TCustomForm). This will free the form, but only when all event handlers, etc. have finished

Re: [DUG] Self Freeing

2004-03-18 Thread Robert martin
I don't believe that method works if you've already called... .PleaseDontGoOnMeNow (Pearl Jam) Rob Martin Software Engineer phone 03 377 0495 fax 03 377 0496 web www.chreos.com - Original Message - From: Stephen Barker [EMAIL PROTECTED] To: 'NZ Borland Developers Group -