Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to open an access db to update table structure and fields. I would like to ask which approach is better:

1. Open the db at the start of the Program make ALL updates then close the db at the end of the Program.

or

2. Open db then do update on a field then close the db. And do this procedure for each update until I have iterated on all updates.


Thanks for any advise.
Posted

1 solution

Basically it depends on your programme if your programme makes alot of updates on the table continuously, then open the connection when you start the update process and after updating all the records close the connection. Otherwise if your programme update records not in continuous manner then open it on each update and after that close it and open it again on new update. But don't open it on the start of the programme. It's Not the good idea unless your programme perform some actions on the Database(Insert, Get Records etc.) on start.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900