How should I work with Connect and Disconnect? Should I keep my connection as short as possible, like:
connect
do some thing to database
disconnect
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
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.