I am fairly new to DAO recordsets, so I want to make sure I am doing things right. When I access a table in my database, I use the code:
Dim db as Database
Set db = CurrentDb()
Dim MyRecSet as DAO.Recordset
Set MyRecSet = db.OpenRecordset("SELECT * FROM MyTable", dbOpenDynaset, dbSeeChanges)
<< INSERT DATA MANIPULATION OR WHATEVER >>
MyRecSet.Close
Set MyRecSet = Nothing
Do I need to close my database (db)? If I execute this series often, is this going to be a problem with memory at all? Any tips? Thanks!
Dim db as Database
Set db = CurrentDb()
Dim MyRecSet as DAO.Recordset
Set MyRecSet = db.OpenRecordset("SELECT * FROM MyTable", dbOpenDynaset, dbSeeChanges)
<< INSERT DATA MANIPULATION OR WHATEVER >>
MyRecSet.Close
Set MyRecSet = Nothing
Do I need to close my database (db)? If I execute this series often, is this going to be a problem with memory at all? Any tips? Thanks!