Get result of a Stored Procedure

Hi,

I have a Stored Procedure and this return me a message,

i can get the message but in a table, and i want to send this message to the user in a messageBox or something else, but i cant get the result of the table.

can i get the message in other component?

Or how can i get the value of the table in the position row(0) and column (0)?
I only can found the function .data and getRowCount but this don`t help me.

thanks

Sounds like it returns a dataset. If so you can use .getValueAt(0,0). There is a section in the manual that talks specifically about scripting with dataset and describes the different functions that can be used.

2 Likes

If it is always in the first row and first column, you could execute it as a scalar query, which always returns the value contained in the first row and column. Then you wouldn’t have to worry about getting the value from the dataset after running the query.

1 Like

Thanks,

i put this

result=event.source.parent.getComponent(‘table’).data
result2=result.getValueAt(0,0)

Ando this worked.

thanks

You should even be able to do it as a single line like:

result=event.source.parent.getComponent('table').data.getValueAt(0,0)
1 Like