Hello to all,
I am in the process of building a simple and small app using javascript and a remote MySql database, so i set up this project in Visual Studio Code:

The following code works perfectly when I run it under Google Appscript:
THE PROBLEM: When I use it under Visual Studio Code (in the apps.js file) I get the message "Jdbc is not defined", as follows:

Using SqlTools extension, I am able to run the SELECT statement is VSC and get the correct result:

I am very new to this and probably making some mistake. So I will be grateful if someone please can give a hand on this.
Octavio
:
I am in the process of building a simple and small app using javascript and a remote MySql database, so i set up this project in Visual Studio Code:

The following code works perfectly when I run it under Google Appscript:
JavaScript:
var port = 3306;
var dbName = "sql7621994";
var username = "sql7621994";
var password = "xxxxxxxxxx";
var server = "sql7.freemysqlhosting.net";
function xsomareg() {
try {
var url = 'jdbc:mysql://' + server + ':' + port + '/' + dbName;
var conn = Jdbc.getConnection(url, username, password);
var stmt = conn.createStatement();
var guarda = stmt.executeQuery("SELECT SUM(valor) FROM registos");
guarda.next();
console.log(guarda.getDouble(1));
} catch (err) {
console.log('Failed with error: %s', err.message);
}
}

Using SqlTools extension, I am able to run the SELECT statement is VSC and get the correct result:

I am very new to this and probably making some mistake. So I will be grateful if someone please can give a hand on this.
Octavio
: