klyn.databases.sql.DriverManager.getConnection
method

    public static getConnection(url as String,
    user as String = "",
    password as String = "") as Connection throws Exception:

Description

Opens a SQL connection from a database URL and credentials.

    import klyn.databases.sql

    # cnx = DriverManager.getConnection("mariadb://localhost:3306/app", "app", "secret")
    # cnx = DriverManager.getConnection("sqlserver://localhost:1433/app", "app", "secret")
    # cnx = DriverManager.getConnection("odbc://app", "app", "secret")

Throws

- Exception if driver lookup, URL parsing, network setup, authentication, or database negotiation fails.