Method DacConnectionPool():acquire() Foundation

Acquires a connection for a specific connection string.

Syntax
:acquire( <cConnStr> ) --> oSession
Parameters
<cConnStr>
A string representing the connection details. This is the same format used with the DacSession() method. Ensure the string contains all required connection parameters, such as server name, database name, authentication details, etc.
Return

Returns a connected session corresponding to the specified connection string or NIL.

Description

This method retrieves an idle connection associated with the provided connection string. If no idle connection is available, it establishes a new connection. In the event the connection pool is exhausted, NIL is returned.

Use this method to manage connections efficiently, minimizing the overhead of repeatedly creating and closing connections.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.