'Read a Database with a loop

my problem is as follows: i have a database, each row represents a delivery that my agent has to make. The first column contains the specific name of the delivery, the others the names of the nodes to be reached ('pad_1','pad_2,'pad_3'.......). enter image description here

In the main I have a string vector that contains the name of all the columns in the database.

enter image description here

I also have an event that at the specific delivery time calls a function with which I would like to scroll through the columns of the database of the row related to the delivery, so as to fill a vector of nodes with the contents of columns other than 0.

The query to the database, I wanted to automate it by scrolling the vector of strings with this code: ''' int [] Pad = new int[n_pc]; for (int i=0;i< n_pc;i++){ Pad[i]=selectFrom(farmacia_clinica).where(farmacia_clinica.fascia.eq(FASCIA_A).uniqueResult(farmacia_clinica.PAD_FarmaciaClinica[i]));}

the error is in the last command "uniqueResult(farmacia_clinica.PAD_FarmaciaClinica[i])"

How can I resolve this?

Thank u.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source