In my recent application i have a collection of routines that all open then close one of three databases.
eg
sub routine1
open database
open query
get Query into an Array
close query
close database
end sub
a reviewer of the code complained this was inefficient and bad style. presumably he feels i should leave the database open for the whole time the application is running.
the routines are all pretty high level, and are not called repeatedly in a loop with any regularity.
i would appreciate any views on the subject.
eg
sub routine1
open database
open query
get Query into an Array
close query
close database
end sub
a reviewer of the code complained this was inefficient and bad style. presumably he feels i should leave the database open for the whole time the application is running.
the routines are all pretty high level, and are not called repeatedly in a loop with any regularity.
i would appreciate any views on the subject.