Page 2 of 2

Posted: Sun Nov 13, 2005 5:01 pm
by sweatje
Jeroen Oosterlaar wrote:Hi raghavan20,

Why are you passing a database connection object to your objects data management objects? As far as I know, that is not necessary. Once you have created a connection, everything that is executed during the request, can execute transactions freely. So when you have a page script that first initializes the database connection and then invokes some method that executes some database transaction, that object doesn't need to have an expliciet reference to the database connection (object). The connection is 'just there'.
How would you test that?

Posted: Sun Nov 13, 2005 11:56 pm
by Jeroen Oosterlaar
sweatje wrote:How would you test that?
Isn't that the responsibility of the code that calls the object? In my opinion, taking care of the database connection should not concern such objects, but they should be able to assume there is a connection available. I think that separated database connection managing is preferable.

Posted: Tue Nov 15, 2005 4:51 am
by raghavan20
Thanks for your reply guys...but I would be more happier if you can reply to recent problems I posted in my earlier thread.