J
John B
Is is better to:
(1) Have a single connection object in a database class which is
instantiated when first used at start-up and used by other classes (opened
and closed as necessary - NOT kept open).
or
(2) Local variable connections created in the function in which they are
used (and maybe reference the connectionstring in the database class)?
(1) Have a single connection object in a database class which is
instantiated when first used at start-up and used by other classes (opened
and closed as necessary - NOT kept open).
or
(2) Local variable connections created in the function in which they are
used (and maybe reference the connectionstring in the database class)?