Is it better to close the access database after each operation to keep it open for subsequent operations

I am working on a VB.NET project that captures data from an Access database file. All the code snipeets I came across open the databases, do things and close them for each operation. Currently, I open the database for the entire duration of the application and close it only after the application exits.

My question is: is it possible to open a connection to the database file for each operation, and not keep it open for the entire duration of the application?

+3
source share
2 answers

Jet/ACE. LDB ( ) . , , ( ), , .

, . , , , (, , - , - ), .

Jet/ACE , , , .

, , concurrency Jet/ACE, , concurrency, . , Jet/ACE, , , , Jet/ACE , .

+1

, , , . (, , IDbConnection, OleDbConnection.

, , , . , , , , - .

, : -, , ?

+2

Source: https://habr.com/ru/post/1773184/


All Articles