[resolved] tJavaFlex - multiple rows

One Star

[resolved] tJavaFlex - multiple rows

I needing return many rows from a tJavaFlex.
There are 2 components in the job: tJavaFlex and tLogRow.
There are 2 colunms in the schema: COD and DESC.

In the tJavaFlex:
Start code: connect to a data base, execute the SQL.
Main code: loop with the result.
row1.COD = return.col1;
row1.DESC = return.col1;
End code: disconnect to a data base

The connection and SQL execute are working very well, but the return of tJavaFlex is just one row (the last row). The result of SQL has many row.
How can I return many rows fom the tJavaFlex?

Accepted Solutions
Employee

Re: [resolved] tJavaFlex - multiple rows

You have to switch the opening loop with the result to begin part
And don't forget to close your loop in end part.

All Replies
Employee

Re: [resolved] tJavaFlex - multiple rows

You have to switch the opening loop with the result to begin part
And don't forget to close your loop in end part.
One Star

Re: [resolved] tJavaFlex - multiple rows

That it is!
Thank you very much!
One Star

Re: [resolved] tJavaFlex - multiple rows

There are 2 components in the job: tJavaFlex and tLogRow.
There are 2 colunms in the schema: COD and DESC.

In the tJavaFlex:
Start code: connect to a data base, execute the SQL.
Main code: loop with the result.
row1.COD = return.col1;
row1.DESC = return.col1;
End code: disconnect to a data base

I do not know how to connect to an oracle database from tjavaflex.Can you help me?
One Star

Re: [resolved] tJavaFlex - multiple rows

Thank you mhirt.
Your solution helped t oresolve my probelmSmiley Happy
One Star

Re: [resolved] tJavaFlex - multiple rows

Why Error Message Talend Tjava not have function. I can't know what error it appeared. please help me