Hi all,

I'm trying to filter many messages querying a database but I can't do it bec ause system returns an extrange message : "Array index out of range: 0".

This is the script:

var dbConn = DatabaseConnectionFactory.createDatabaseConnection ('net.sourceforge.jtds.jdbc.Driver','jdbc:jtds:sql server://localhost:1433/mytable','sa','*********');
var resultado = dbConn.executeCachedQuery("SELECT pacidx from dexpacie WHERE nif='" + msg['nif'].toString() + "'");
resultado.next();
var nid=resultado.getFloat(1);
logger.info('filtro: ');

if (nid == null)
var respuesta = false
else
var respuesta = true;
logger.info('filtro: ' + nid);
dbConn.close();
return respuesta;

At this point, no logger information, just a silly error!.

Anyn hints?,

Ricardo Bernat