Crookshanks
Technical User
Hello there,
I've got a small and simple question about the database object in Microsoft Access. I am using the DAO objectmodel. The structure of procedures with data changes is as follows:
set db = currrentDb
set rs = db.openrecordset(tablename): rs.index = "PrimaryKey"
....
....
rs.close: set rs = nothing: set db = nothing
Q: Is it wise to just set the db object at the beginnen of the runtime and close it afterwards. Or is the above mentioned structure recommended?
Regards,
I've got a small and simple question about the database object in Microsoft Access. I am using the DAO objectmodel. The structure of procedures with data changes is as follows:
set db = currrentDb
set rs = db.openrecordset(tablename): rs.index = "PrimaryKey"
....
....
rs.close: set rs = nothing: set db = nothing
Q: Is it wise to just set the db object at the beginnen of the runtime and close it afterwards. Or is the above mentioned structure recommended?
Regards,