Skip to Content
Sep 30, 2019 at 10:06 AM

Accessing HANA via SQLCC ONLY in XSA


In an XSA application [1], SQLCC config would be made to access HANA database that is outside HDI container as a secondary connection. The SQLCC config would be attached to hana options as below.

// configure HANA SQLCC
try {
	options.hana.sqlcc = xsenv.getServices({ "xsjs.sqlcc_config": "NAME-OF-USER-PROV-SERVICE" });
} catch (err) {
	console.log("[WARN]", err.message);

But what if the XSA application ONLY connects to a database that resides outside HDI. I have tried to attach the sqlcc config to options alone. But doing so would make the $.hdb API object undefined. This results in Cannot read property 'getConnection' of undefined. Can anyone help me here? TIA.

var oConnection = $.hdb.getConnection({
    "sqlcc": "xsjs.sqlcc_config",
    "pool": true