The only explainable reason for null values is that those columns does not exist in your database. I think the column names are case sensitive.
I know that, but I don't think that could be the problem. The columns and tables appear in my H2 Database, and when I created a testing table, for the table name I used the following:
test
I then went on to create two tables which were:
id
and
name
When I edited the exdtension's coding, it looked something like this:
Code: Select all
function handleRequest(cmd, params, user, fromRoom)
{
// create a SQL statement
var sql = "SELECT * FROM test ORDER BY name"
// execute query on DB
// queryRes is a ResultSet object
var queryRes = dbase.executeQuery(sql)
// If the queryRes is not null the query was successfull
if (queryRes != null) {
// Cycle through all records in the ResultSet
for (var i = 0; i < queryRes.size(); i++) {
// Get a record
var tempRow = queryRes.get(i)
trace("Record n." + i)
trace("Name: " + tempRow.getItem("name"))
trace("Id: " + tempRow.getItem("id"))
trace("-------------------------------------------")
}
}
}
The values still traced out as null.