Using DB connector

1
0
-1

Hi everyone!

I would like to know if someone can help me how to use the DB Connector for SQL Server.

I have already created the Connector to an automatic task, configure the sql query and use the graphical mode (N to N in this case) to assign the resultset to a variable type java.util.List

Is it okay to use a java.util.List variable to load the tableResult?

I get data from the query result as a String ([Field1, Field2, Field3]), but I think it would be ideal to convert each row to an object, is it possible to do it when the resultTable is assigned to the variable?

So I can get a field from the query result, but I'm sure it can be done better than this:

import java.util.logging.Logger

Logger logger = Logger.getLogger ("org.bonitasoft")
logger.severe ("Amount of logs:" + reports.size (). toString ())

for (var in reports) {

String [] clientList = var.toString (). Split (",")
def customer = customerList [3]

logger.severe ("The Client is:" + client)
}

No answers yet.
Notifications