Database Connect and Disconnect

How should I work with Connect and Disconnect? Should I keep my connection as short as possible, like:

do some thing to database

Or is it ok to have the database connectio lying around the business process so that other parts of the process can use the connecion?

When I’m connected to a database (backend: MS Access), does that mean I’m locking the database while I’m holding the connection. Like, nobody else can access the db while I’m using it? Or could the database be updated by another program while I maintain my connection?

@bcm you can have both approach but as a good practice you should always disconnect from the database once your work is over. Regarding the locking of database, multiuser can access the database parallelly

1 Like

For access and oledb connections, pooling is already automatically handled, you dont have to worry on holding the connections for reuse, just use the Execute Query or Execute Non Query activities.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.