B4J Programming Press on the image to return to the main documentation page.

jConnectionPool

List of types:

ConnectionPool

ConnectionPool

Maintains a pool of database connections.

Events:

ConnectionReady (Success As Boolean, SQL As SQL)

Members:


  ClosePool

  GetConnection As SQL

  GetConnectionAsync (EventName As String)

  Initialize (DriverClass As String, JdbcUrl As String, User As String, Password As String)

  IsInitialized As Boolean

Members description:

ClosePool
GetConnection As SQL
Retrieves a connection from the pool. Make sure to close the connection when you are done with it.
GetConnectionAsync (EventName As String)
Asynchronously gets a SQL connection. This method is useful in UI applications as it prevents the main thread from freezing until the connection is available.
The ConnectionReady event will be raised when the connection is ready.
Initialize (DriverClass As String, JdbcUrl As String, User As String, Password As String)
Initializes the pool.
DriverClass - The JDBC driver class.
JdbcUrl - JDBC connection url.
User / Password - Connection credentials.
IsInitialized As Boolean

Top