I recommend you to use jConnectionPool. This way you will not need to manage the connections and you will always get a valid connection.
Ok … is there any documentation for using jConnectionPool? Or examples? I couldn't find any, perhaps I am looking in the wrong place...
I have got as far as initializing with
CP.Initialize(driver, jdbcUrl, Username, Password)
However my next step
CP.GetConnectionAsync("sqlMB")
wait for sqlMB_ConnectionReady(Success As Boolean, sqlMB As SQL)
throws a compiler error "Parameter name cannot hide global variable name"
My sqlMB is the global name for the SQL I'm using throughout the application, so I'm not sure what the connection pool is looking for here.
My original question also still stands. The jConnectionPool.getConnection help bubble says "Make sure to close the connection when done with it" but the jConnectionPool.getConnectionAsync does not. Do I need to close each connection when I use jConnectionPool.getConnectionAsync? What happens if I don't?