Dan Waters
dwaters at usinternet.com
Mon Sep 27 12:35:16 CDT 2004
Charlotte, Thanks for describing this - I did not know that was the difference. With what I'm currently doing I don't need to refresh immediately, but I'll remember this for when I do. Thanks! Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, September 27, 2004 10:45 AM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Elegant Solution? The difference is that if you use CurrentDb, you don't have to refresh to see the changes. DBEngine is faster because it doesn't refresh automatically. Redo your test with a refresh after every change and see how they compare. Charlotte Foust -----Original Message----- From: Dan Waters [mailto:dwaters at usinternet.com] Sent: Friday, September 24, 2004 7:06 AM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Elegant Solution? Using CurrentDB everywhere is slower. I use: Set rst = DBEngine(0)(0).OpenRecordset(stg,db.....) I did a test once and determined that using the above line is exactly 8 times faster than using: Set rst = CurrentDB.OpenRecordset(stg,db.....) However, you must use CurrentDB for some things, like setting the current database's properties in VBA. Dan Waters -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bobby Heid Sent: Friday, September 24, 2004 6:19 AM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Elegant Solution? I thought using currentdb everywhere used extra resources and was a no-no. Bobby -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Erwin Craps - IT Helps Sent: Friday, September 24, 2004 3:57 AM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Elegant Solution? I never do dbs as DAO.Database I always do Set rstTemp as currentdb.openrecordset (bla bla) Dbs can be replaced by currentdb Erwin -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of ACTEBS Sent: Friday, September 24, 2004 9:13 AM To: access group Subject: [AccessD] Elegant Solution? Hi Everyone, Does anyone have any code or such that handles the following elegantly: Dim dbs as DAO.Database Dim rst as DAO.Recordset Set dbs etc etc Do whatever here dbs.close dbs = nothing etc etc I am tired of having do the above to open database connections and recordsets in the above manner in every Sub or Function. Surely there's a more elegant method that someone has come up with here you just parse the SQL Statement through or something... Any suggestions or links will be greatly appreciated... Regards Vlad -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com