View Full Version : Use of Connections


Harrzack
05-27-2008, 05:47 AM
Greets to all!

I'm new to Access (worked a lot with other db apps), and am learning about the Connections. I plan to do all my work as Projects, and have the databases on MS Server 2k.

In all the readings I've done about Connections, they explain nicely how they work and I (mostly) understand. My question now is, on the practical use of Connections. IE - Do you make a single Connection, then re-use it and create a Recordset for table involved in a Form...

Or...

Should each Recordset have it's own Connection. (I think not...)

These apps will be small utility apps only used by 3 or 4 people and involve 4 or 5 tables, but I want to do it 'right'

TIA! :D

=Alan R.

Banana
05-27-2008, 05:50 AM
Here's a whitepaper on Jet and ODBC. (http://support.microsoft.com/kb/128385). It will explain how Access will create as many connections *as necessary*. Ideally, only one connection is needed, but that is dependent on ODBC driver and the database engine.

In my case where MySQL is the backend and I use MyODBC as the ODBC driver, I make sure that I allow "multiple statements" to keep the number of connection to minimum. This has to be specified in the Option argument of the connection string.