Calling Stored Procedures

The JDBC Connector's "getConnection()" method gives you access to the JDBC Connection object created when the connector has successfully initialized. You can know more about this in the provided section.

In other words, if your JDBC connector is named DBconn in your AL,
var con = DBconn.getConnector().getConnection();
will give you access to the JDBC Connection object (an instance of java.sql.Connection).
Note: When called from anywhere inside the connector itself, you can also use the thisConnector variable.
Here is a code example illustrating how you can invoke a stored procedure on that database:
// Stored procedure call
command = "{call DBName.dbo.spProcedureName(?,?)}";

try {
    cstmt = con.prepareCall(command);

    // Assign IN parameters (use positional placement)
    cstmt.setString(1, "Christian");
    cstmt.setString(2, "Chateauvieux");

    cstmt.execute();

    cstmt.close();
    // Security Directory Integrator will close the connection,
    // but you might want to force a close now.
    DBConn.close();
}

catch(e) {
    main.logmsg(e);
}