Setting dynamic headings to Table

Hi All,

I’m using Vaadin 6 (6.8.12 to be exact) & I have the following requirement to be fulfilled.

There’s a screen that has a TextArea(that will contain a
native SQL query
). And there’s a button called “Execute”. Upon this button click, I need to execute the SQL script & show fetched results in a Table on the same screen.

Now, my concern is : I need to get the
column headers from the SQL script
&
set them to the Table
component.
But the tricky part is that the SQL script might differ time to time & also it might have joins. Therefore, the column headers will change depending on the script.

I don’t think that using the SQLContainer would work for this as I need to run
native SQL queries
.
Can someone point me in the right direction please…?
Any help is greatly appreciated.

Thanks & regards,
Asela.