Banana
07-22-2008, 12:12 PM
I'm hoping someone can help clarify this; FMS Inc has a great article (http://www.fmsinc.com/free/NewTips/Access/LinkedDatabase.asp) about how to improve performance by having a persistent connection using OpenDatabase method, which interestingly enough, was what I did before I found the article but for different reasons.
The only thing I am not quite sure is this essentially means we now have X database variables, X being the numbers of different backend we link to and two separate connections to same backend.
The Access Help also says:
Note When you access a Microsoft Jet-connected ODBC data source, you can improve your application's performance by opening a Database object connected to the ODBC data source, rather than by linking individual TableDef objects to specific tables in the ODBC data source.
Does it then means that I could just OpenDatabase, then bind forms using tables from that variable? I had thought that all forms/controls/queriers/any other Access objects will always work through default database?
Should I then make sure that my objects refer to the second variable, rather than default database, even if they may be almost identical.
Note:
?DBEngine(0)(1) is DbEngine(0)(0)
False <-- I thought they were same? But then, I supplied ODBC connection so...
DBEngine(0)(0).TableDefs.Count
40
DBEngine(0)(1).TableDefs.Count
34 <-- six less, which is just the numbers of all MSys tables
The only thing I am not quite sure is this essentially means we now have X database variables, X being the numbers of different backend we link to and two separate connections to same backend.
The Access Help also says:
Note When you access a Microsoft Jet-connected ODBC data source, you can improve your application's performance by opening a Database object connected to the ODBC data source, rather than by linking individual TableDef objects to specific tables in the ODBC data source.
Does it then means that I could just OpenDatabase, then bind forms using tables from that variable? I had thought that all forms/controls/queriers/any other Access objects will always work through default database?
Should I then make sure that my objects refer to the second variable, rather than default database, even if they may be almost identical.
Note:
?DBEngine(0)(1) is DbEngine(0)(0)
False <-- I thought they were same? But then, I supplied ODBC connection so...
DBEngine(0)(0).TableDefs.Count
40
DBEngine(0)(1).TableDefs.Count
34 <-- six less, which is just the numbers of all MSys tables