Better to open recordsets and leave them open? 
Author Message
 Better to open recordsets and leave them open?

I've got a program that has multiple subs accessing a database to update
data on a form in the the db. Is it better to open and close recordsets as
needed, or is it better to open a recordset once, leave it open and access
as needed and close when the user is finished with the program. What if one
of the recordsets is a query in Access?

Thanks.



Sat, 19 Oct 2002 03:00:00 GMT  
 Better to open recordsets and leave them open?
This can be a great debate subject... but here's my 2c.

Most of the answers lay in how the product will be used over a network !

I usually have the database open throughout the execution of the app.

If the recordset is being used within a 'Modal' form then I may leave the
recordset open until the modal form is closed, but only if it has a coding
benefit.  Otherwise I open and close recordset as needed.

Regards
Steve Thornton



Sun, 20 Oct 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Opening recordsets(OpenRecordset vs. Recordset.Open)

2. is leaving a Connection open a good/ bad practice

3. Leave recordset open, or close and reopen.

4. Leave recordset open, or close and reopen.

5. Is leaving db open == leaving pants down?

6. Best way to handle opening small recordsets repeatedly

7. Best options for Opening Dynamic Recordset

8. RDO: Best way to open recordset

9. database connection remain open if opened via recordset

10. Opening an empty recordset even though the opened table has data

11. Connection.Execute vs. Recordset.Open or Command.Open

12. Opening an ADOX Catalog Whilst ADO Recordset is Open

 

 
Powered by phpBB® Forum Software